A light weight Python library for the Ochre Web API
Project description
Ochrepy
Ochrepy is a Python library. Its primary purpose is to interface with the Ochre API from Python. This can act as a very helpful package for ETL/ELT for Python developers working for music (and music-related) companies.
Table of Contents
Features
Ochrepy supports all features of the web API available at the Ochre API Documentation.
Installation
pip install ochrepy
alternatively, for Windows users
py -m pip install ochrepy
or upgrade
pip install ochrepy --upgrade
Quick Start
Comprehensive documentation will be provided soon, explaining all available methods and abilities of this package. For the meantime, examples can be found in the examples directory.
To use this package, you will need a client ID and a client secret, which you can obtain through your account manager at Ochre.
Example with client authentication
.env
OCHRE_CLIENT_ID=
OCHRE_CLIENT_SECRET=
OCHRE_CLIENT_USERNAME=
code
import ochrepy
from ochrepy.auth import OchreClientCredentials
op = ochrepy.Ochre(client_credentials_manager=OchreClientCredentials())
results = op.music_tracks.list()
for track in response['results']:
pprint(track['title'] + ' - ' + track['artist']['name'])
Expected result will be the list of tracks found in your account.
'Track 1 - Artist 1'
'Track 2 - Artist 2'
'Track 3 - Artist 3'
'Track 4 - Artist 4'
'Track 5 - Artist 5'
'Track 6 - Artist 6'
'Track 7 - Artist 7'
'Track 8 - Artist 8'
'Track 9 - Artist 9'
'Track 10 - Artist 10'
Reporting Issues
If you have suggestions, bugs or other issues specific to this library, file them here. Or just send a pull request.
Contributing
If you are a developer with Python experience, and you would like to contribute to Ochrepy, please be sure to follow the guidelines listed on documentation page.
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 Distributions
Built Distribution
File details
Details for the file ochrepy-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: ochrepy-1.0.1-py3-none-any.whl
- Upload date:
- Size: 18.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10e97ad1cce7420c892f71acd6efe92379f6936ac03193a850f5ceeba9eeadfe |
|
MD5 | 6e0e7a9e8e4f95ff8ff9db745a9ad685 |
|
BLAKE2b-256 | 9b8e78683a7fdd7b77c4628dfef30350466c83c9eb659ef7d535ef5a33916468 |