c99e636d6e
Squashed commit of the following: commit 4552d85cc49fda572e54aa9c8054031554bfcb3a Author: Maxime Alves LIRMM@home <maxime.alves@lirmm.fr> Date: Thu Oct 7 13:57:37 2021 +0200 [0.5.13] commit 38032acfac559155b31c12cf12673c81b7cfdf20 Author: Maxime Alves LIRMM@home <maxime.alves@lirmm.fr> Date: Thu Oct 7 13:57:12 2021 +0200 add 503 error code commit 6f516e844b0f3786aa571d1ac8d575247ff7b7fe Author: Maxime Alves LIRMM@home <maxime.alves@lirmm.fr> Date: Thu Oct 7 13:26:15 2021 +0200 [ci] add run halfapi --version |
||
---|---|---|
conf | ||
halfapi | ||
scripts | ||
tests | ||
.gitignore | ||
.gitlab-ci.yml | ||
CHANGELOG.md | ||
LICENSE.txt | ||
MANIFEST.in | ||
Pipfile | ||
Pipfile.lock | ||
README.md | ||
pyproject.toml | ||
pytest.ini | ||
requirements.txt | ||
setup.cfg | ||
setup.py |
README.md
HalfAPI
Base tools to develop comlex API with rights management.
Dependencies
- python3
- python3-pip
- libgit2-dev
- starlette
- PyJWT
- click
- uvicorn
- orjson
- pyyaml
Configuration
Configure HalfAPI in the file : .halfapi/config .
It's an ini file that contains at least two sections, project and domains.
### Project
The main configuration options without which HalfAPI cannot be run.
name : Project's name
halfapi_version : The HalfAPI version on which you work
secret : The file containing the secret to decode the user's tokens.
port : The port for the test server.
loglevel : The log level (info, debug, critical, ...)
Domains
The name of the options should be the name of the domains' module, the value is the submodule which contains the routers.
Example :
dummy_domain = .routers
Usage
Develop an HalfAPI domain by following the examples located in tests/dummy_domain . An HalfAPI domain should be an importable python module that is available in the python path.
Run the project by using the halfapi run
command.
API Testing
@TODO
Example
Check out the sample project that helps you to build your own domain.
Development
@TODO