Jacobson is a self-hosted zipcode API https://krisque.codeberg.page/jacobson/
Krisque 2e89f8ed2c version-0.2 (#5)
### DONE (v0.2)
- [x] Fix database session with get_db or get_session
- [x] Start Integration tests
- [x] Docs (mkdocs + mkdocs-material[to beautify] + mkdocstrings[to transform docstrings into docs])
- [x] mkdocs on gh pages and/or readthedocs
- [x] Taskipy
- [x] Re-enable Coordinates on database and api's (only cep_aberto available)

#### See [README.md](https://codeberg.org/Krisque/jacobson/src/branch/main/README.md) to full roadmap

### BREAKING CHANGE

- Now postgres is needed because of uuid pk.
- Remake migrations.

#### See [CHANGELOG.md](https://codeberg.org/Krisque/jacobson/src/branch/main/CHANGELOG.md) to look at every change

Reviewed-on: #5
Co-authored-by: Krisque <chrisemke@protonmail.com>
Co-committed-by: Krisque <chrisemke@protonmail.com>
2024-08-01 00:28:48 +00:00
api version-0.2 (#5) 2024-08-01 00:28:48 +00:00
containers/app version-0.2 (#5) 2024-08-01 00:28:48 +00:00
database version-0.2 (#5) 2024-08-01 00:28:48 +00:00
documentation version-0.2 (#5) 2024-08-01 00:28:48 +00:00
license-templates sqlmodel (#1) 2024-04-08 17:15:35 +00:00
plugins version-0.2 (#5) 2024-08-01 00:28:48 +00:00
tests version-0.2 (#5) 2024-08-01 00:28:48 +00:00
utils version-0.2 (#5) 2024-08-01 00:28:48 +00:00
.editorconfig version-0.2 (#5) 2024-08-01 00:28:48 +00:00
.gitignore sqlmodel (#1) 2024-04-08 17:15:35 +00:00
.pre-commit-config.yaml version-0.2 (#5) 2024-08-01 00:28:48 +00:00
alembic.ini version-0.1 (#4) 2024-05-28 17:41:43 +00:00
CHANGELOG.md version-0.2 (#5) 2024-08-01 00:28:48 +00:00
compose.yml version-0.2 (#5) 2024-08-01 00:28:48 +00:00
LICENSE.txt sqlmodel (#1) 2024-04-08 17:15:35 +00:00
mkdocs.yml version-0.2 (#5) 2024-08-01 00:28:48 +00:00
poetry.lock version-0.2 (#5) 2024-08-01 00:28:48 +00:00
pyproject.toml version-0.2 (#5) 2024-08-01 00:28:48 +00:00
README.md version-0.2 (#5) 2024-08-01 00:28:48 +00:00
requirements.txt version-0.2 (#5) 2024-08-01 00:28:48 +00:00
requirements_dev.txt version-0.2 (#5) 2024-08-01 00:28:48 +00:00
sample.env version-0.2 (#5) 2024-08-01 00:28:48 +00:00
schema.graphql version-0.2 (#5) 2024-08-01 00:28:48 +00:00

jacobson

self-hosted zipcode API

The initial structure I imagined would be:

*api query/get* -> search in database -> if there is any result return;
else async call to all plugins that are configured, return and insert on database
*api mutation/post* -> manually update or insert zipcodes
call to tell the api to update some register from plugins that are configured

ROADMAP:

DONE (v0.1)

  • git hooks (pre-commit)
  • ORM (SqlModel)
  • Api's support services (cepaberto, viacep...)
  • Unit tests (pytest)
  • Migrations and data seed (Alembic)

DONE (v0.2)

  • Fix database session with get_db or get_session
  • Start Integration tests
  • Docs (mkdocs + mkdocs-material[to beautify] + mkdocstrings[to transform docstrings into docs])
  • mkdocs on gh pages and/or readthedocs
  • Taskipy
  • Re-enable Coordinates on database and api's (only cep_aberto available)

TODO (Needed for v0.3)

  • Add log support (loguru? or OpenTelemetry?)
  • Custom exceptions
  • Auth (pyjwt+pwdlib)
  • More test (unit and integration)

TODO (Needed until v1.0)

  • Populate the database with zip codes and cities
  • Automate migrations tests?
  • separate tests into groups to be run selectively
  • git hooks to run fast and slow tests
  • Resolve all code issues (TODO's on docstrings)
  • CI and CI tests
  • freeze versions on docker and pyproject
  • Better structure for services (plugin-like)
  • Send 'total' information on api requests for pagination

TODO (nice to have)

  • add option to seed all cities (or chosen list)
  • add option to seed all zip codes (or chosen list)
  • add graphql schema generator on git hooks
  • move from docker-compose to a podman pod
  • study mypyc viability
  • jacobson logo

DEV

The idea is to just run this command and podman will run the entire dev environment

obs: before this command you need to create the .env (see sample.env for example)

to run podman as expected, you will need the packages "podman", "podman-compose" and "aardvark-dns"

podman compose up -d --build

You can access the api at localhost port 8000 /graphql

http://127.0.0.1:8000/graphql