Lite Framework, Easy Coding, High Performance, No Dependencies, Tested for Production
Features
- Lite with no dependencies
- The framework built using standard python libraries and does not need third party pre-requisites.
- Easy Code
- The framework designed to allow different levels of skillsets to use the code and learn it fast.
- Supported
- Our team is committed to review, test and resolve any issues related to the framework interactively. Please don’t hesitate to submit your problem in github’s issue section.
Requirements
Python 3.6+
Installation
pip install liteapi
Usage
from liteapi import liteapi,BaseAPIRequest
app = liteapi()
@app.register('/')
class rootMethod (BaseAPIRequest):
def get(self):
return {'message': 'Thank you for using liteapi'}
app.run()
- Import the framework using
from liteapi import liteapi,BaseAPIRequest
- Create an app instance of liteapi
app = liteapi()
- Note: to change the socket binding you can pass the host and port arguments to liteapi as below
app = liteapi(host='0.0.0.0', port=8080)
- Register class for each URI (The class has to be subclass from BaseAPIRequest)
@app.register('/')
class rootMethod (BaseAPIRequest):
- Inside your class, define your methods of get, delete, post, put
def get(self):
return {'message': 'Welcome to liteapi'}
- Run your instance
app.run()
Example
The below example shows different method use cases for liteapi:
@app.register('/{tenant:str}')
class tenantMethod (BaseAPIRequest):
def get(self, tenant):
return {'message': 'Hello', 'tenant': tenant, 'query': self.request.query_string}
def put(self, tenant):
return {'method': 'Put', 'tenant': tenant, 'json': self.request.json}
def post(self, tenant):
return {'method': 'Post', 'tenant': tenant, 'json': self.request.json}
def delete(self, tenant):
return {'method': 'Delete', 'tenant': tenant, 'json': self.request.json}
Documentaion
Click Here to access the documentation
License
This project is licensed under the terms of GPL-3.0 license.
Metadata
Release files for liteapi 0.5.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| liteapi-0.5.3.tar.gz | 43.1 kB | Without provenance | Details for liteapi-0.5.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| liteapi-0.5.3-py3-none-any.whl | Python 3 | none | any | Details for liteapi-0.5.3-py3-none-any.whl |
Total release size: 90.2 kB
Release files / liteapi-0.5.3.tar.gz
| Download URL | liteapi-0.5.3.tar.gz |
|---|---|
| Size | 43.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a5ae3fd9270efa5134889861dfe287b080a9bff41987e404d5ac4df64b55d012
|
|
BLAKE2b-256 checksum How to use checksums |
45237c56b0e646f95ed56a81b3a55bcf0b959c10bdb787d55a132ec6727183fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.7.8
|
Release files / liteapi-0.5.3-py3-none-any.whl
| Download URL | liteapi-0.5.3-py3-none-any.whl |
|---|---|
| Size | 47.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cbfbe127870828df00296d94ed6241b4990fedac7b0dc05b3343ec9a45b18b77
|
|
BLAKE2b-256 checksum How to use checksums |
a7d2f7804740afa57a919ee6cdf19f61b95edf1d9368812838b181539cdd225a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.7.8
|
Security for liteapi 0.5.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.