Skip to main content

Myapi framework

Eazy python framework for beginers

pip install myapiframework

# main.py
from myapiframework import MyAPI
from myapiframework import Response
from myapiframework import parse_json, parse_form

app = MyAPI()


@app.get('/')
def home(request):
    data = {'message': 'hello'}
    return Response(status=200, data=data)

# get post with id 
@app.get('/post/{id}/')
def get_post(request, id):
    post = {
        'id': id,
        'name': 'myapi',
        'description': 'new framework myapi'
    }
    return Response(status=200, data=post)


# create post
@app.post('/post/')
def create_post(request):
    if request.content_type == 'application/json':
        data = parse_json(request.data)
        return Response(status=201, data=data)
    data = parse_form(request.data, request)
    return Response(status=201, data=data)

gunicorn main:app

methods:

  • get
  • post
  • put
  • patch

Release files for myapiframework 1.0

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

Source distribution (sdist)

Source distribution for myapiframework 1.0
File Size Uploaded
myapiframework-1.0.tar.gz 2.9 kB Details

Release files / myapiframework-1.0.tar.gz

Download URL myapiframework-1.0.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c5464742e04134d9a8357e5bca6de4db8de79aef431e97d657927830a7080c8d
BLAKE2b-256 checksum
How to use checksums
e91a86daf4aef54db650e26c35d5ce812a820d08f88bbcfda8dfca99e871ff8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.8

Release history Release notifications | RSS feed

This release

1.0 This release

1 release file

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