Skip to main content

A small CLI to quickly obtain an API token for Deezer API.

Project description

Deezer OAuth CLI

CI Status Test coverage percentage

Poetry black pre-commit

PyPI Version Supported Python versions License

A small CLI to quickly obtain an API token for Deezer API.

Obtaining API token to develop API applications can be complicated and sometimes feel like a chicken and egg situation: it's hard to play with the API without a token, but it can be difficult to get a token without an application to do the OAuth flow.

Given the app ID and secret, this tool lets you quickly get an API token.

Installation

Install this via pip (or your favourite package manager):

pip install deezer-oauth-cli

Usage

Before starting to use this tool, you first need to declare your Deezer app in their developer portal. Create a new app with the following Redirect URL: http://localhost:8080/oauth/return.

Once created, Deezer will generate an application ID and secret key for you, that's the 2 parameters that you need to run this tool:

$ deezer-oauth APP_ID APP_SECRET

This will:

  • Spin up a webserver in the background running at http://localhost:8080.
  • Open your browser to grant authorisation access to your Deezer account.
  • Redirect to a page showing the API token & expiry.
  • Write the token to a .env file (note: this will overwrite the entire file).

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Bruno Alla

💻 🤔 📖

This project follows the all-contributors specification. Contributions of any kind welcome!

Credits

This package was created with Cookiecutter and the browniebroke/cookiecutter-pypackage project template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deezer-oauth-cli-0.1.0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

deezer_oauth_cli-0.1.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file deezer-oauth-cli-0.1.0.tar.gz.

File metadata

  • Download URL: deezer-oauth-cli-0.1.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.8.12 Darwin/20.6.0

File hashes

Hashes for deezer-oauth-cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 04e0a6fd29528a29d1d8b375b7564a87d54d85c4072171c95a147efccc29f7b1
MD5 fafcb5baf6031640f1fbdcbdcd95b1a7
BLAKE2b-256 ef1a3fa20fa40aae45cbc9bb25048bf0c589a8bd13aa19c5925fc39afa668e4f

See more details on using hashes here.

File details

Details for the file deezer_oauth_cli-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for deezer_oauth_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b4cabc38aa41a02c8fbe04320a199b553590e0cf500489139cc511252740435d
MD5 5eed32e0f5382c618fcdb08c041cb138
BLAKE2b-256 ad97b24fd08c715f569c05768099b879b2eaed64390b15a4a081f8a393e95c83

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page