An ASGI framework to build HTTP API's from a Python module structure.
Go to file
Joël Maïzi 7d6bc2c181 [router][api] Fix GET / 2020-09-29 15:08:35 +02:00
conf [release][0.1.0] First HalfAPI release 2020-07-23 17:54:47 +02:00
halfapi [router][api] Fix GET / 2020-09-29 15:08:35 +02:00
scripts [query] add fields list to query 2020-07-20 11:20:58 +02:00
tests [routing] handle fqtn parameter in domain schema + get_api_routes (/) + /user -> /halfapi/current_user 2020-09-28 17:22:27 +02:00
.gitignore [router][api] Fix GET / 2020-09-29 15:08:35 +02:00
CHANGELOG.md [release][0.1.0] First HalfAPI release 2020-07-23 17:54:47 +02:00
LICENSE [release][0.1.0] First HalfAPI release 2020-07-23 17:54:47 +02:00
MANIFEST.in [package] fixed some paths 2020-08-27 09:54:48 +02:00
Pipfile [deps] add orjson dependency 2020-09-24 20:48:52 +02:00
Pipfile.lock [deps] add orjson dependency 2020-09-24 20:48:52 +02:00
README.md [doc] Update readme 2020-07-29 22:07:16 +02:00
pyproject.toml [deps] Updated dependencies and added files for standard packaging. 2020-07-29 22:07:16 +02:00
pytest.ini [routing] handle fqtn parameter in domain schema + get_api_routes (/) + /user -> /halfapi/current_user 2020-09-28 17:22:27 +02:00
requirements.txt [deps] jwt -> PyJWT 2020-08-07 02:08:22 +02:00
setup.cfg [deps] Updated dependencies and added files for standard packaging. 2020-07-29 22:07:16 +02:00
setup.py [deps] add orjson dependency 2020-09-24 20:48:52 +02:00

README.md

HalfAPI

This Python-based ASGI application aims to provide the core functionality to multiple API domains.

It's developed at the LIRMM in Montpellier, France.

The name "halfAPI" comes from the deep relationship between it and halfORM, a project authored by Joël Maizi.

You'll need a database with the API details. You can find the database model in halfapi/models/api.sql

TODO : include a token generation tool for testing purpose.

Dependencies

  • python3
  • python3-pip
  • libgit2-dev

Installing

With local folder :

pip3 install -r requirements.txt .[cli]

From the repository :

pip3 install git+ssh://git@gite.lirmm.fr:malves/halfapi.git[cli]

CLI usage

Running

Development mode

In the project's folder :

halfapi run

Production

The production server may use different init systems. As our main server is Debian-based, we use systemd services to manage the api server. Find the right service files and configure them properly in order to make your production setup perfect.

cp conf/systemd/lirmm_api* /etc/systemd/system/
systemctl daemon-reload
systemctl start lirmm_api

To make it start at boot :

systemctl enable lirmm_api

To get the logs :

journalctl -f --unit lirmm_api

Testing

Installing

pip3 install .[cli][tests]

Running

pytest -v