Backsky is a Python/Django REST API that provides authoritative data about Brazilian cities. It serves as the back-end for the Cidades do Brasil project, exposing city lists and related lookup endpoints so front-ends or other services can consume city metadata in a simple, standardized way. It is not an official government source.
- RESTful API built with Django and Django REST Framework.
- Endpoints to list cities, retrieve details for a specific city, and perform basic searches and filters.
- Pagination and simple filtering for efficient client usage.
- Clear data model using canonical identifiers (for example, IBGE municipality codes) and consistent field naming.
This project uses a compact, industry-standard stack chosen to make the codebase approachable for reviewers while demonstrating backend skills:
- Language: Python (3.10+)
- Framework: Django & Django REST Framework
- Database: SQLite (development), PostgreSQL (recommended for production)
- API Tools:
django-filterfor filtering, DRF pagination. - Tooling:
pip/venvfor development. Docker support may be included.
GET /api/cities/— returns a paginated list of cities.GET /api/cities/{id}/— returns full metadata for a single city.- Filtering/search:
/api/cities/?search={term},/api/cities/?state={UF}
Example:
curl -s "https://your-backend.example.com/api/cities/?search=rio"Contributing
- Open issues for bugs or feature suggestions.
- Submit pull requests with clear descriptions and tests for behavioral changes where appropriate.
- Follow repository coding style and include migration files for model changes.
License This project is licensed under the MIT License - see the LICENSE file for details.