api-tackle-0.2
توضیحات
API Tackle - Simple Python REST API Framework
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | api-tackle-0.2 |
| نام | api-tackle |
| نسخه کتابخانه | 0.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | bernardt@preakelt.com |
| ایمیل نویسنده | bernardt@preakelt.com |
| آدرس صفحه اصلی | https://github.com/praekelt/api-tackle |
| آدرس اینترنتی | https://pypi.org/project/api-tackle/ |
| مجوز | BSD 3-Clause License |
API Tackle - Simple Python REST API Framework:
**********************************************
Simple Python REST API Framework ...
Quickstart
----------
See https://github.com/praekelt/api-tackle-example-app for an example of how to build an API-Tackle application.
A simple wsgi example application looks like:
.. code-block:: python
""" WSGI Flask App for production hosting with e.g.: gunicorn --bind 0.0.0.0:80 -w 1 -t 120 wsgi """
import os
import logging
from tackle.flask_utils import create_flask_app # noqa
from tackle.flask_utils import setup_logging # noqa
from tackle.prometheus_utils import create_prometheus_server # noqa
from tackle.rest_api.wrapper_util import add_auth_token # noqa
from my_api.rest_api import get_path # noqa
create_prometheus_server(9100)
setup_logging(requested_logging_path='~/.tackle/logs',
include_prometheus=True)
flask_app = create_flask_app(specification_dir=get_path() + '',
add_api=True,
swagger_ui=True,
database_url='sqlite://',
database_create_tables=True,
debug=False)
# === Add some auth tokens to the DB ===
add_auth_token('tackleb6-12dd-4104-a7b6-f7d369ff5fec', "Default token e.g. internal hosting.")
# === ===
logging.info(f"rest_wsgi_app.py: __name__ == {__name__}")
application = flask_app.app
if __name__ == "__main__":
logging.info(f"rest_wsgi_app.py: __main__ Starting Flask app in Python __main__ .")
flask_app.run()
Building your own API
---------------------
...
نیازمندی
| مقدار | نام |
|---|---|
| ==1.14.0 | six |
| ==1.4.2 | alembic |
| ==1.4.3 | appdirs |
| ==19.3.0 | attrs |
| ==2020.4.5.1 | certifi |
| ==3.0.4 | chardet |
| ==7.1.2 | click |
| ==1.2.2 | clickclick |
| ==2.7.0 | connexion[swagger-ui] |
| ==3.0.8 | flask-cors |
| ==2.5.3 | flask-migrate |
| ==2.0.6 | flask-script |
| ==2.4.1 | flask-sqlalchemy |
| ==0.8.0 | flask-testing |
| ==1.1.2 | flask |
| ==20.0.4 | gunicorn |
| ==2.9 | idna |
| ==1.6.0 | importlib-metadata |
| ==0.4.0 | inflection |
| ==1.1.0 | itsdangerous |
| ==2.11.2 | jinja2 |
| ==3.2.0 | jsonschema |
| ==1.1.2 | mako |
| ==1.1.1 | markupsafe |
| ==0.2.8 | openapi-spec-validator |
| ==5.1.0 | pip-tools |
| ==0.7.1 | prometheus-client |
| ==2.8.5 | psycopg2 |
| ==0.16.0 | pyrsistent |
| ==2.8.1 | python-dateutil |
| ==1.0.4 | python-editor |
| ==5.3.1 | pyyaml |
| ==2.23.0 | requests |
| ==1.3.16 | sqlalchemy |
| ==0.0.6 | swagger-ui-bundle |
| ==1.25.9 | urllib3 |
| ==1.0.1 | werkzeug |
| ==3.2 | wget |
| ==3.1.0 | zipp |
نحوه نصب
نصب پکیج whl api-tackle-0.2:
pip install api-tackle-0.2.whl
نصب پکیج tar.gz api-tackle-0.2:
pip install api-tackle-0.2.tar.gz