0470f9fa89
Squashed commit of the following: commit 7fe3e22f5e4108b5eb149abf8d608334debc49ca Author: Maxime Alves LIRMM <maxime.alves@lirmm.fr> Date: Thu Sep 2 16:59:52 2021 +0200 [0.5.9] release commit c36c0fcc982388a5acf2f9f937fa8ab54a18f3de Author: Maxime Alves LIRMM <maxime.alves@lirmm.fr> Date: Thu Sep 2 16:53:13 2021 +0200 [conf] fix #19 et ajout du test (test_dummy_project_router/test_get_config) configuration du domaine accessible depuis : l'attribut config de l'argument "halfapi" pour les fonctions request.scope['config'] pour les fonctions async commit cc235eee8c6f8f5d3606dda0f88156697eac296e Author: Maxime Alves LIRMM <maxime.alves@lirmm.fr> Date: Thu Sep 2 14:59:17 2021 +0200 [tests] don't import click two times commit fa418478c76205bb407e536737d8e389b4bf391c Author: Maxime Alves LIRMM <maxime.alves@lirmm.fr> Date: Thu Sep 2 14:57:06 2021 +0200 [clean] remove unused variables, remove [] as default value in fct, raise from exc |
||
---|---|---|
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