Metadata-Version: 2.5
Name: pyinegi
Version: 0.1.0
Summary: A Python client for querying indicators and metadata from the INEGI API.
Project-URL: Documentation, https://github.com/guadaloop-07/pyinegi#readme
Project-URL: Issues, https://github.com/guadaloop-07/pyinegi/issues
Project-URL: Repository, https://github.com/guadaloop-07/pyinegi
Author: guadaloop-07
License: MIT License
        
        Copyright (c) 2026 guadaloop-07
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: requests>=2.31
Provides-Extra: dev
Requires-Dist: mypy>=1.13; extra == 'dev'
Requires-Dist: pandas-stubs>=2.2; extra == 'dev'
Requires-Dist: pandas>=2.0; extra == 'dev'
Requires-Dist: pre-commit>=4.0; extra == 'dev'
Requires-Dist: pytest-cov>=6.0; extra == 'dev'
Requires-Dist: pytest>=8.3; extra == 'dev'
Requires-Dist: ruff>=0.8; extra == 'dev'
Requires-Dist: twine>=6.0; extra == 'dev'
Requires-Dist: types-requests>=2.32; extra == 'dev'
Provides-Extra: pandas
Requires-Dist: pandas>=2.0; extra == 'pandas'
Description-Content-Type: text/markdown

# pyinegi

A typed Python client for querying indicators and metadata from the [INEGI Indicators API](https://www.inegi.org.mx/servicios/api_indicadores.html).

## Installation

```console
pip install pyinegi
```

## Quick start

Set your API token outside source code, then query an indicator:

```console
export INEGI_TOKEN="your-token"
```

```python
from pyinegi import InegiClient

series = InegiClient().get_indicator("1002000001", geography="00")
for observation in series[0].observations:
    print(observation.period, observation.value)
```

Install `pyinegi[pandas]` to use `pyinegi.pandas.to_dataframe`.

## Metadata catalogs

Retrieve indicator metadata or another documented catalog with `get_catalog`:

```python
entries = InegiClient().get_catalog("CL_INDICATOR", "1002000001")
print(entries[0].description)
```

Pass `record_id=None` to retrieve every record in a supported catalog.

## Development

See [CONTRIBUTING.md](CONTRIBUTING.md). The project uses protected-main pull requests, English Conventional Commits, pre-commit hooks, and GitHub Actions quality gates.

## License

[MIT](LICENSE)
