An ASGI framework to build HTTP API's from a Python module structure.
Go to file
Maxime Alves LIRMM 0470f9fa89 [0.5.9] release
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
2021-09-02 17:01:36 +02:00
conf [release][0.1.0] First HalfAPI release 2020-07-23 17:54:47 +02:00
halfapi [0.5.9] release 2021-09-02 17:01:36 +02:00
scripts [query] add fields list to query 2020-07-20 11:20:58 +02:00
tests [0.5.9] release 2021-09-02 17:01:36 +02:00
.gitignore [0.5.3] 2021-06-17 18:53:23 +02:00
.gitlab-ci.yml [ci] add continuous integration 2021-09-02 10:38:19 +02:00
CHANGELOG.md [release][0.1.0] First HalfAPI release 2020-07-23 17:54:47 +02:00
LICENSE.txt [packaging] 0.5.8 update to PyPi 2021-09-01 15:59:47 +02:00
MANIFEST.in [package] fixed some paths 2020-08-27 09:54:48 +02:00
Pipfile [deps] starlette 0.16 2021-09-02 14:48:48 +02:00
Pipfile.lock [tests][lib/responses] format des dates ORJSON + update deps (fix bug dates) 2021-03-12 19:02:23 +01:00
README.md [readme] fix formatting 2021-09-01 15:24:53 +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] removed half_orm from dependencies 2020-10-20 08:25:50 +02:00
setup.cfg [deps] Updated dependencies and added files for standard packaging. 2020-07-29 22:07:16 +02:00
setup.py [deps] starlette 0.16 2021-09-02 14:48:48 +02:00

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