An organized way to create REST APIs
Project description
Lapis is a file-based REST API framework inspired by Modern Serverless Cloud Services
To create a basic Lapis server, create a folder called api and create python script named path.py then within your main folder create a python script to start the server (we will call this script main.py in our example)
Your project directory should look like this:
project-root/
|-- api/
| |-- path.py
`-- main.py
Then within the api/path.py file create your first GET api endpoint by adding the following code:
from lapis import Response, Request
async def GET (req : Request) -> Response:
return Response(status_code=200, body="Hello World!")
Finally by adding the following code to main.py and running it:
from lapis import Lapis
server = Lapis()
server.run("localhost", 80)
You can now send an HTTP GET request to localhost:80 and recieve the famous Hello World! response!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lapis_api-0.2.1.post1.tar.gz.
File metadata
- Download URL: lapis_api-0.2.1.post1.tar.gz
- Upload date:
- Size: 13.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e6273b579a45e05ae849f1cf23f477621ea4ae8f3d1cc46fc0dc37fe324e1ef
|
|
| MD5 |
c94ff53fe919feae7905c267d0eaa615
|
|
| BLAKE2b-256 |
36ccdd4c1197af656c8eda59e44932ac142ee6c44548a6821b980c44e3c7beed
|
Provenance
The following attestation bundles were made for lapis_api-0.2.1.post1.tar.gz:
Publisher:
python-publish.yml on CQVan/Lapis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lapis_api-0.2.1.post1.tar.gz -
Subject digest:
6e6273b579a45e05ae849f1cf23f477621ea4ae8f3d1cc46fc0dc37fe324e1ef - Sigstore transparency entry: 971516293
- Sigstore integration time:
-
Permalink:
CQVan/Lapis@172b9249c58e4328742913ef73fde639b1d63caf -
Branch / Tag:
refs/tags/0.2.1.post1 - Owner: https://github.com/CQVan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@172b9249c58e4328742913ef73fde639b1d63caf -
Trigger Event:
release
-
Statement type:
File details
Details for the file lapis_api-0.2.1.post1-py3-none-any.whl.
File metadata
- Download URL: lapis_api-0.2.1.post1-py3-none-any.whl
- Upload date:
- Size: 14.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2cec81c096e9b2d0d09a85358ea91e4bd1ce1fb6dfc3341921a0e2357067acd6
|
|
| MD5 |
43491bacb4a92e2bf93f15b462e13c51
|
|
| BLAKE2b-256 |
3bfee6cabd3993525dcf2d10aee3a192e29ad3f99323405ea9540ab470045749
|
Provenance
The following attestation bundles were made for lapis_api-0.2.1.post1-py3-none-any.whl:
Publisher:
python-publish.yml on CQVan/Lapis
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lapis_api-0.2.1.post1-py3-none-any.whl -
Subject digest:
2cec81c096e9b2d0d09a85358ea91e4bd1ce1fb6dfc3341921a0e2357067acd6 - Sigstore transparency entry: 971516347
- Sigstore integration time:
-
Permalink:
CQVan/Lapis@172b9249c58e4328742913ef73fde639b1d63caf -
Branch / Tag:
refs/tags/0.2.1.post1 - Owner: https://github.com/CQVan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@172b9249c58e4328742913ef73fde639b1d63caf -
Trigger Event:
release
-
Statement type: