Python client for the Openverse API
Project description
openverse-api-client
Fully typed Openverse API clients for Python and JavaScript.
Installation
Python
pip install openverse-api-client
JavaScript
npm install @openverse/api-client
Development
Dependencies:
hatch
pnpm
just
This project generates Python and TypeScript clients for the Openverse API, based on endpoint definitions written in Python, and Jinja2 templates for Python and TypeScript files. A full build of both clients requires the following steps:
- Generating the client code:
hatch run generate
- Building the npm package (including TypeScript definitions):
just pnpm build
- Building the Python package:
hatch build
The just build
recipe encapsulates these tasks into a single command. Each task can run on its own for debugging different parts of the client code generation or build process.
In most cases, you will need to run at least hatch run generate
for development tools to work, because otherwise critical files will be missing that other runtime code depends on.
The Python clients live in the same package as the client generation code, which allows them to reuse the endpoint definitions for Python type hints without introducing an intermediary package. The Jinja2 dependency is optional, and only installed when the generator
feature is installed (i.e., pip install openverse-api-client[generator]
).
License
openverse-api-client
is distributed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for openverse_api_client-0.0.1a0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2fdfc818f9de03db8d4936cc23adb05871e6ead0642583f3e3b74b16eb04923 |
|
MD5 | 9c767bb7257811df245ad5e4cb03f4b7 |
|
BLAKE2b-256 | d6dbd25d54eb0190f848dfc1551441df3dbadab846664bd609c33093bbad47f0 |
Hashes for openverse_api_client-0.0.1a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c29a041a7d7400b74dadf04f9f7aca7e8f3b5c3f29e2a50c09051321b015a03 |
|
MD5 | 396d777cb5fb3ac84bc1dda47e83cc28 |
|
BLAKE2b-256 | a0b4f343f44eb42257d8a5286a6836ee2b32814f99ff19ac2c79a18befb0cb05 |