Podigee Connector for Podcast Data
Project description
Podigee Connector
This is a simple library for connecting to the Podigee API.
It can be used to export data from your dashboard at
https://app.podigee.com/analytics
Supported Endpoints
/podcasts/{podcast_id}/analytics/podcasts/{podcast_id}/overview(with optional scope parameter for totals)/podcasts/{podcast_id}/analytics/episodes/episodes/{episode_id}/analytics
See __main__.py for all endpoints.
Credentials
This API supports three authentication methods:
- Using the official API token. This option is preferred, but only available if you have a professional account.
- Using Podigee username and password. Use this only if you don't have access to the API through your account.
- Using a session cookie that you need to extract manually from your browser.
If possible, use option 1, the official API token, as it is the most secure and officially supported authentication method. Find more information on the different authentication methods below.
Using the official API token
from podigeeconnector import PodigeeConnector
connector = PodigeeConnector(
base_url=BASE_URL,
podigee_access_token=PODIGEE_ACCESS_TOKEN,
)
Using the session token
Alternatively, you can use a session token to log in:
from podigeeconnector import PodigeeConnector
connector = PodigeeConnector(
base_url=BASE_URL,
podigee_session_v5=PODIGEE_SESSION_V5,
)
Using username and password
Finally, you can also call the login endpoint with your username and password to log in:
from podigeeconnector import PodigeeConnector
connector = PodigeeConnector.from_credentials(
base_url=BASE_URL,
podcast_id=PODCAST_ID,
username=USERNAME,
password=PASSWORD,
)
Installation
pip install podigeeconnector
Usage as a library
from podigeeconnector import PodigeeConnector
connector = PodigeeConnector(
base_url=BASE_URL,
podigee_access_token=PODIGEE_ACCESS_TOKEN,
)
end = datetime.now()
start = end - timedelta(days=30)
podcast_analytics = connector.podcast_analytics(podcast_id, start, end)
logger.info("Podcast Analytics = {}", json.dumps(podcast_analytics, indent=4))
# Get totals with listeners and subscribers count
podcast_totals = connector.podcast_totals(podcast_id, start, end)
logger.info("Total Downloads: {}", podcast_totals.get("total_downloads"))
logger.info("Unique Listeners: {}", podcast_totals.get("unique_listeners_number"))
# Get total downloads for a specific episode
episode_total = connector.episode_total_downloads(episode_id, start, end)
logger.info("Episode Total Downloads: {}", episode_total)
See __main__.py for all endpoints.
Development
We use uv for virtualenv and dependency management. With uv installed:
- Install your locally checked out code in editable mode, including all
runtime, dev, and optional dependencies, into a project-local
.venv:
uv sync --all-extras --dev
- Create an environment file and fill in the required values:
cp .env.sample .env
- Run the script (uv handles the virtualenv automatically):
uv run podigeeconnector
To add a new runtime dependency:
uv add $package
To add a new development-only dependency:
uv add --dev $package
To run linters, formatters, and tests:
make lint
make format-check
make test
Releasing
- Bump the
versionfield inpyproject.toml. - Commit and tag the release (
git tag vX.Y.Z), then push the tag. - Create a GitHub release for the tag. CI will build (
uv build) and publish sdist + wheel to PyPI viatwineusing thePYPI_API_TOKENsecret.
To build and publish manually:
make publish
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file podigeeconnector-0.4.1.tar.gz.
File metadata
- Download URL: podigeeconnector-0.4.1.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb4d5332b918707c5a95bdbbb1c08eba149f29b7efe5dcaa958a4be693dbb82f
|
|
| MD5 |
a30e93dbfa4c52c6ac4e9dbc07d0c15d
|
|
| BLAKE2b-256 |
e686edcb5cc1e30dfe1e25e829274efae37ca4def32cfdb1a3204e00b452f0e2
|
File details
Details for the file podigeeconnector-0.4.1-py3-none-any.whl.
File metadata
- Download URL: podigeeconnector-0.4.1-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4a72d68e4dd503b08d950857434f6838bfd890203a5ae50769ed073e0e37f5b
|
|
| MD5 |
83dfa5f349b21166ac23b10bfb273acf
|
|
| BLAKE2b-256 |
fc7c37bc88bb2a2eeceb25fb7119dcd5f57a7852ceafe6acaf4dae7cf6843ce1
|