All Projects → Gr1N → aioapi

Gr1N / aioapi

Licence: MIT license
Yet another way to build APIs using AIOHTTP framework

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to aioapi

pyladies-courseware
Homework/task submit and review web app · based on React and Python aiohttp
Stars: ✭ 14 (+0%)
Mutual labels:  aiohttp, aiohttp-server
aiohttp-three-template
Project template for Python aiohttp three-tier web applications
Stars: ✭ 20 (+42.86%)
Mutual labels:  aiohttp, aiohttp-server
mem usage ui
Measuring and graphing memory usage of local processes
Stars: ✭ 124 (+785.71%)
Mutual labels:  aiohttp, aiohttp-server
Typical
Typical: Fast, simple, & correct data-validation using Python 3 typing.
Stars: ✭ 111 (+692.86%)
Mutual labels:  annotations, typing
telescope
A dumb auditing service
Stars: ✭ 15 (+7.14%)
Mutual labels:  aiohttp
auto-parcel
A fast annotation processor to make your objects `Parcelable` without writing any of the boilerplate.
Stars: ✭ 80 (+471.43%)
Mutual labels:  annotations
pybind11-stubgen
Generates stubs for python modules (targeted to C++ extensions compiled with pybind11)
Stars: ✭ 103 (+635.71%)
Mutual labels:  typing
PornHub-Downloader
基于 Aiohttp 和 Pyppeteer 的 PornHub 视频下载工具,支持多任务并行下载。
Stars: ✭ 20 (+42.86%)
Mutual labels:  aiohttp
typist
Web app practice and learn touch-typing.
Stars: ✭ 36 (+157.14%)
Mutual labels:  typing
odoo-stubs
Python Stubs for Odoo
Stars: ✭ 40 (+185.71%)
Mutual labels:  typing
tt
Practicing touch typing, and monitor your typing speed using your own text files
Stars: ✭ 68 (+385.71%)
Mutual labels:  typing
typing.js
Js library for creating typing effect on webpage.
Stars: ✭ 22 (+57.14%)
Mutual labels:  typing
amigo
AmiGO is the public interface for the Gene Ontology.
Stars: ✭ 26 (+85.71%)
Mutual labels:  annotations
asyncpy
使用asyncio和aiohttp开发的轻量级异步协程web爬虫框架
Stars: ✭ 86 (+514.29%)
Mutual labels:  aiohttp
pyrser
A PEG Parsing Tool
Stars: ✭ 32 (+128.57%)
Mutual labels:  typing
annotate
Create 3D labelled bounding boxes in RViz
Stars: ✭ 104 (+642.86%)
Mutual labels:  annotations
hyperion
Experimental framework for working with IIIF in JavaScript and Typescript.
Stars: ✭ 17 (+21.43%)
Mutual labels:  annotations
phantom-types
Phantom types for Python.
Stars: ✭ 120 (+757.14%)
Mutual labels:  typing
universe-topology
A universal computer knowledge topology for all the programmers worldwide.
Stars: ✭ 47 (+235.71%)
Mutual labels:  aiohttp
symbok-bundle
Symfony annotations bundle
Stars: ✭ 50 (+257.14%)
Mutual labels:  annotations

aioapi

Build Status codecov PyPI PyPI - Downloads GitHub

Yet another way to build APIs using AIOHTTP framework.

Follow documentation to know what you can do with AIOAPI.

Installation

$ pip install aioapi

Usage & Examples

Below you can find a simple, but powerful example of AIOAPI library usage:

import aioapi as api
from aioapi import Body, PathParam
from aioapi.middlewares import validation_error_middleware
from aiohttp import web
from pydantic import BaseModel


class User(BaseModel):
    name: str
    age: int = 42


async def hello_body(user_id: PathParam[int], body: Body[User]):
    user = body.cleaned
    return web.json_response(
        {"id": user_id.cleaned, "name": user.name, "age": user.age}
    )


def main():
    app = web.Application()

    app.add_routes([api.post("/hello/{user_id}", hello_body)])
    app.middlewares.append(validation_error_middleware)

    web.run_app(app)


if __name__ == "__main__":
    main()

And there are also more examples of usage at examples/ directory.

To run them use command below:

$ make example

Contributing

To work on the AIOAPI codebase, you'll want to clone the project locally and install the required dependencies via poetry:

$ git clone [email protected]:Gr1N/aioapi.git
$ make install

To run tests and linters use command below:

$ make lint && make test

If you want to run only tests or linters you can explicitly specify what you want to run, e.g.:

$ make lint-black

Milestones

If you're interesting in project's future you can find milestones and plans at projects page.

License

AIOAPI is licensed under the MIT license. See the license file for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].