๐Ÿ“ฆ encode / apistar

The Web API toolkit. ๐Ÿ› 

โ˜… 5.6k stars โ‘‚ 409 forks ๐Ÿ‘ 5.6k watching โš–๏ธ BSD 3-Clause "New" or "Revised" License
apipythonrest
๐Ÿ“ฅ Clone https://github.com/encode/apistar.git
HTTPS git clone https://github.com/encode/apistar.git
SSH git clone git@github.com:encode/apistar.git
CLI gh repo clone encode/apistar
Alexander Kovalev Alexander Kovalev python 3.7 issubclass() fix (#598) f34f429 7 years ago ๐Ÿ“ History
๐Ÿ“‚ f34f4296cb436f69dbb72980ba3bed56bf1aff0b View all commits โ†’
๐Ÿ“ apistar
๐Ÿ“ docs
๐Ÿ“ docs-theme
๐Ÿ“ scripts
๐Ÿ“ tests
๐Ÿ“„ .codecov.yml
๐Ÿ“„ .coveragerc
๐Ÿ“„ .flake8
๐Ÿ“„ .gitignore
๐Ÿ“„ .isort.cfg
๐Ÿ“„ .travis.yml
๐Ÿ“„ LICENSE.md
๐Ÿ“„ mkdocs.yml
๐Ÿ“„ README.md
๐Ÿ“„ requirements.txt
๐Ÿ“„ setup.py
๐Ÿ“„ README.md

API Star

A smart Web API framework, for Python 3.

Build Status codecov Package version


Community: https://discuss.apistar.org ๐Ÿค” ๐Ÿ’ญ ๐Ÿค“ ๐Ÿ’ฌ ๐Ÿ˜Ž

Documentation: https://docs.apistar.com ๐Ÿ“˜


Features

Why might you consider using API Star for your next Web API project?

  • Schema generation - Support for automatically generating OpenAPI schemas.
  • Expressive - Type annotated views, that make for expressive, testable code.
  • Performance - Dynamic behaviour for determining how to run each view makes API Star incredibly efficient.
  • Throughput - Support for asyncio allows for building high-throughput non-blocking applications.

Quickstart

Install API Star:

$ pip3 install apistar

Create a new project in app.py:

from apistar import App, Route


def welcome(name=None):
    if name is None:
        return {'message': 'Welcome to API Star!'}
    return {'message': 'Welcome to API Star, %s!' % name}


routes = [
    Route('/', method='GET', handler=welcome),
]

app = App(routes=routes)


if __name__ == '__main__':
    app.serve('127.0.0.1', 5000, debug=True)

Open http://127.0.0.1:5000/docs/ in your browser:

API documentation


API Star is BSD licensed code.
Designed & built in Brighton, England.

API Star