A focused API microservice for calculating food voucher limits under ISR rules using current UMA values.
- Automated UMA value updates from INEGI's official API
- Food voucher limit validation according to ISR rules
- Remaining limit calculations
- Swagger UI documentation for all endpoints
/api/v1/uma
- Get current UMA values/api/v1/vouchers/validate
- Validate voucher amounts/api/v1/vouchers/remaining
- Check remaining limits
- Python 3.11+
- PostgreSQL database
- INEGI API key for UMA updates
-
Set required environment variables:
DATABASE_URL
: PostgreSQL connection stringINEGI_API_KEY
: API key for INEGI's service
-
Install dependencies:
pip install -r requirements.txt
-
Run migrations:
flask db upgrade
-
Start the server:
python main.py
API documentation is available at /swagger-ui/
when the server is running.
flask update-uma
: Update UMA values from INEGI's API
MIT