A small pypi project, that allows you to make your own API.
Project description
makeapi
A small package, that allows you to make an API.
Example
import makeapi
app = MakeAPI("localhost", 8000) # localhost is your local computer
@app.get("/main")
def main(request : makeapi.Request):
return makeapi.PlainResponse("Hello!")
app.run()
# Go to http://localhost:8000/main in your browser and you should see Hello!
Example with POST request
import makeapi
app = MakeAPI("localhost", 8000)
@app.post("/main")
def params_route(request : makeapi.Request):
params = request.json
return JsonResponse(params)
app.run()
# Make post request and include json data to http://localhost:8000/main and it should show your json data
Enjoy!
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
makeapi-1.0.5.tar.gz
(4.1 kB
view details)
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 makeapi-1.0.5.tar.gz.
File metadata
- Download URL: makeapi-1.0.5.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
537cb3157c08c527469955a27dae41879609b539a55879a116604e65437dd6e4
|
|
| MD5 |
39e05b4e9edc0d66a15b8c70056c2c0e
|
|
| BLAKE2b-256 |
6f4e4f9c8e7681f7c2bfe1dcf144403d39b890758335163274b6db6cbdaa9319
|
File details
Details for the file makeapi-1.0.5-py3-none-any.whl.
File metadata
- Download URL: makeapi-1.0.5-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62112bafff25a87d972c5fa7b7b64b71f73d6d5885cf176d2abc3a620fa69fa1
|
|
| MD5 |
bcb1eb85a81b751ea1801be831c178b5
|
|
| BLAKE2b-256 |
229ea22670b09757ceb207b11a487710ab4274530958c332652f3883aaf79222
|