معرفی شرکت ها


avrofastapi-0.0.4


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

Automatic avro wire protocol support for FastAPI
ویژگی مقدار
سیستم عامل -
نام فایل avrofastapi-0.0.4
نام avrofastapi
نسخه کتابخانه 0.0.4
نگهدارنده []
ایمیل نگهدارنده []
نویسنده kheina
ایمیل نویسنده -
آدرس صفحه اصلی https://github.com/kheina-com/avrofastapi
آدرس اینترنتی https://pypi.org/project/avrofastapi/
مجوز Mozilla Public License 2.0
<p align="center"> <img src="https://github.com/kheina-com/avrofastapi/raw/main/logo.png" alt="AvroFastAPI Logo"> <br> <a href="https://github.com/kheina-com/avrofastapi/actions?query=workflow%3Apython-package+event%3Apush+branch%3Amain"> <img src="https://github.com/kheina-com/avrofastapi/actions/workflows/python-package.yml/badge.svg?branch=main" alt="python-package.yml workflow"> </a> <a href="https://pypi.org/project/avrofastapi"> <img src="https://img.shields.io/pypi/v/avrofastapi?color=success&label=pypi%20package" alt="pypi package version"> </a> </p> <p align="center"> Add <a href="https://avro.apache.org/docs/1.11.1/specification/_print/#protocol-wire-format">Avro encoding</a> support to your FastAPI application with a one-line setup </p> ```diff - app = FastAPI() + app = AvroFastAPI() ``` # Installation `pip install avrofastapi` # Usage ## SERVER ```python from avrofastapi import AvroFastAPI from datetime import datetime, timezone from pydantic import BaseModel app = AvroFastAPI() class TestResponseModel(BaseModel) : A: str B: int C: datetime @app.get('/', response_model=TestResponseModel) def v1Example() : return TestResponseModel( A='ayy', B=1337, C=datetime.now(timezone.utc), ) if __name__ == '__main__' : from uvicorn.main import run run(app, host='0.0.0.0', port=5000) ``` ## CLIENT ```python from avrofastapi.gateway import Gateway from datetime import datetime from pydantic import BaseModel import requests import asyncio class TestResponseModel(BaseModel) : A: str B: int C: datetime requests.get('http://localhost:5000/').json() # returns: {'A': 'ayy', 'B': 1337, 'C': '2023-01-22T10:01:00.543317+00:00'} gateway = Gateway('http://localhost:5000/', 'v1Example__get', response_model=TestResponseModel) asyncio.run(gateway()) # returns: TestResponseModel(A='ayy', B=1337, C=datetime.datetime(2023, 1, 22, 10, 2, 29, 641314, tzinfo=<avro.timezones.UTCTzinfo object at 0x7efbe9cdb580>)) ``` # Development Fork the parent repository at https://github.com/kheina-com/avrofastapi and edit like any other python project. Tests are run with `pytest` in the command line and input sorting is run via `isort .` # License This work is licensed under the [Mozilla Public License 2.0](https://choosealicense.com/licenses/mpl-2.0/), allowing for public, private, and commercial use so long as access to this library's source code is provided. If this library's source code is modified, then the modified source code must be licensed under the same license or an [applicable GNU license](https://www.mozilla.org/en-US/MPL/2.0/#1.12) and made publicly available.


نیازمندی

مقدار نام
~=1.11.1 avro
~=66.1.1 setuptools
~=5.5.0 ujson
~=3.7.3 aiohttp
~=0.89.1 fastapi
~=1.9.0 pydantic
~=0.38.4 wheel
~=3.4.2 twine
~=6.2.1 pytest
~=0.14.0 pytest-asyncio
~=3.4.0 pytest-mock
~=5.11.4 isort
~=0.3.0 pytest-aiohttp
~=3.0.0 pytest-cov
~=0.6.2 pytest-env
~=0.23.1 httpx


زبان مورد نیاز

مقدار نام
>=3.7.* Python


نحوه نصب


نصب پکیج whl avrofastapi-0.0.4:

    pip install avrofastapi-0.0.4.whl


نصب پکیج tar.gz avrofastapi-0.0.4:

    pip install avrofastapi-0.0.4.tar.gz