Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
🛠 The Web API toolkit. 🛠
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:
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
info:
title: Widget API
version: '1.0'
description: An example API for widgets
servers:
- url: https://www.example.org/
paths:
/widgets:
get:
summary: List all the widgets.
operationId: listWidgets
parameters:
- in: query
name: search
description: Filter widgets by this search term.
schema:
type: string
Let's also create a configuration file apistar.yml
:
schema:
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 "http://127.0.0.1:8000/" (Ctrl+C to quit)
We can also make API requests to the server referenced in the schema:
$ apistar request listWidgets search=cogwheel
With version 0.6 onwards the API Star project is being focused as a framework-agnositic 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.
FAQs
API documentation, validation, mocking, and clients.
We found that apistar demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.