Skip to main content

A small pypi project, that allows you to make your own API.

Project description

makeapi

Downloads

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)

Uploaded Source

Built Distribution

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

makeapi-1.0.5-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

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

Hashes for makeapi-1.0.5.tar.gz
Algorithm Hash digest
SHA256 537cb3157c08c527469955a27dae41879609b539a55879a116604e65437dd6e4
MD5 39e05b4e9edc0d66a15b8c70056c2c0e
BLAKE2b-256 6f4e4f9c8e7681f7c2bfe1dcf144403d39b890758335163274b6db6cbdaa9319

See more details on using hashes here.

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

Hashes for makeapi-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 62112bafff25a87d972c5fa7b7b64b71f73d6d5885cf176d2abc3a620fa69fa1
MD5 bcb1eb85a81b751ea1801be831c178b5
BLAKE2b-256 229ea22670b09757ceb207b11a487710ab4274530958c332652f3883aaf79222

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