Skip to main content

Core to write deep APIs using a module's tree

Project description

HalfAPI

Base tools to develop complex API with rights management.

This project was developped by Maxime Alves and Joël Maïzi. The name was chosen to reference HalfORM, a project written by Joël Maïzi.

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.

You can try the dummy_domain with the following command.

python -m halfapi routes --export --noheader dummy_domain.routers | python -m halfapi run -

API Testing

@TODO

Example

Check out the sample project that helps you to build your own domain.

Development

@TODO

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

halfapi-0.6.13.tar.gz (24.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

halfapi-0.6.13-py3-none-any.whl (31.6 kB view details)

Uploaded Python 3

File details

Details for the file halfapi-0.6.13.tar.gz.

File metadata

  • Download URL: halfapi-0.6.13.tar.gz
  • Upload date:
  • Size: 24.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.63.0 CPython/3.10.2

File hashes

Hashes for halfapi-0.6.13.tar.gz
Algorithm Hash digest
SHA256 74a47671ce16eac3bb4d0fe11c074685ab4947e70dc3ebe03d634b1ff8e3288a
MD5 c11d15012584761e55de115caf904bd2
BLAKE2b-256 a1690aec6276357c1b26d1838631d1ad688e6736e245505cd20477f402721fe5

See more details on using hashes here.

File details

Details for the file halfapi-0.6.13-py3-none-any.whl.

File metadata

  • Download URL: halfapi-0.6.13-py3-none-any.whl
  • Upload date:
  • Size: 31.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.63.0 CPython/3.10.2

File hashes

Hashes for halfapi-0.6.13-py3-none-any.whl
Algorithm Hash digest
SHA256 3494aeeaba924bbabe48862ab2b97c2c64cdf1f2c8824c5205e2d6d3f9c64a38
MD5 5cf615a1ed6627ca13391357f32d961e
BLAKE2b-256 e01554ab155c89d0037aa1dba79012dcda10a3c1feeaf2571b0844e2e441ff57

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page