Go to file
Gábor Lipták 41d83d35df
Bring Python current in Travis (#682)
2021-08-31 10:48:33 +01:00
apistar Version 0.7.2 2019-04-03 09:12:02 +01:00
docs Set minimum Python version to 3.6 (#655) 2019-04-03 09:06:39 +01:00
scripts Blackify (#648) 2019-03-13 09:17:55 +00:00
tests TypeSystem (#649) 2019-03-14 14:17:44 +00:00
.travis.yml Bring Python current in Travis (#682) 2021-08-31 10:48:33 +01:00
README.md Fix simple typo: agnositic -> agnostic (#672) 2020-02-10 10:46:11 +00:00
requirements.txt TypeSystem (#649) 2019-03-14 14:17:44 +00:00
setup.py Set minimum Python version to 3.6 (#655) 2019-04-03 09:06:39 +01:00


API Star

🛠 The Web API toolkit. 🛠

Build Status codecov Package version

Community: https://discuss.apistar.org 🤔 💭 🤓 💬 😎

Documentation: https://docs.apistar.com 📘

Requirements: Python 3.6+

API Star is a toolkit for working with OpenAPI or Swagger schemas. It allows you to:

  • Build API documentation, with a selection of available themes.
  • Validate API schema documents, and provide contextual errors.
  • Make API requests using the dynamic client library.

You can use it to build static documentation, integrate it within a Web framework, or use it as the client library for interacting with other APIs.


Install API Star:

$ pip3 install apistar

Let's take a look at some of the functionality the toolkit provides...

We'll start by creating an OpenAPI schema, schema.yaml:

openapi: 3.0.0
  title: Widget API
  version: '1.0'
  description: An example API for widgets
  - url: https://www.example.org/
      summary: List all the widgets.
      operationId: listWidgets
      - in: query
        name: search
        description: Filter widgets by this search term.
          type: string

Let's also create a configuration file apistar.yml:

  path: schema.yaml
  format: openapi

We're now ready to start using the apistar command line tool.

We can validate our OpenAPI schema:

$ apistar validate
✓ Valid OpenAPI schema.

Or build developer documentation for our API:

$ apistar docs --serve
✓ Documentation available at "" (Ctrl+C to quit)

We can also make API requests to the server referenced in the schema:

$ apistar request listWidgets search=cogwheel

Where did the server go?

With version 0.6 onwards the API Star project is being focused as a framework-agnostic suite of API tooling. The plan is to build out this functionality in a way that makes it appropriate for use either as a stand-alone tool, or together with a large range of frameworks.

The 0.5 branch remains available on GitHub, and can be installed from PyPI with pip install apistar==0.5.41. Any further development of the API Star server would likely need to be against a fork of that, under a new maintainer.

If you're looking for a high-performance Python-based async framework, then I would instead recommend Starlette.

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

API Star