Skip to main content

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

Release files for halfapi 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for halfapi 0.6.1
File Size Uploaded
halfapi-0.6.1.tar.gz 22.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for halfapi 0.6.1
File Interpreter ABI Platform
halfapi-0.6.1-py3-none-any.whl Python 3 none any Details

Total release size: 51.2 kB

Release files / halfapi-0.6.1.tar.gz

Download URL halfapi-0.6.1.tar.gz
Size 22.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b37d3ba336db5e33ec97bd2f970c66f5dd23379df7687a31ed6c6cfa5b938de9
BLAKE2b-256 checksum
How to use checksums
2d4c715cb965ef8b7f87d30fca4aa3eca7d35aafee3e4ec58099dbd8881ac519
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.2

Release files / halfapi-0.6.1-py3-none-any.whl

Download URL halfapi-0.6.1-py3-none-any.whl
Size 28.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
41feb65211a5eebf88f957c7da6a3ea51892f91400456e794be2594bdd51848f
BLAKE2b-256 checksum
How to use checksums
bd018bb87b1f4db5e5a7f16fe8dfd10251cc9bacab95890d04008f2d637ea4f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.2

Release history Release notifications | RSS feed

0.6.31

2 release files

0.6.29

2 release files

0.6.28

1 release file

0.6.25

2 release files

0.6.23

2 release files

0.6.22

1 release file

0.6.18

2 release files

0.6.17

2 release files

0.6.16

2 release files

0.6.15

2 release files

0.6.14

2 release files

0.6.13

2 release files

0.6.12

2 release files

0.6.11

2 release files

0.6.9

2 release files

0.6.8

2 release files

0.6.7

2 release files

0.6.6

2 release files

0.6.5

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

This release

0.6.1 This release

2 release files

0.6.0

2 release files

0.5.10

2 release files

0.5.9

2 release files

0.5.8

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page