A Python library for interacting with the Udemy Affiliate API.
Project description
⚠️ Important Notice (January 2025)
The Udemy Affiliate API (v2.0) has been discontinued as of January 1, 2025, according to Udemy’s official documentation.As a result, Pydemy is no longer functional, since it depends on the discontinued API.
This repository remains available for educational and archival purposes only.
Future updates may explore compatibility with alternative APIs or platforms.
Pydemy provides a convenient way to interact with the Udemy Affiliate API from your Python applications. You can use Pydemy to search for courses, retrieve course details, fetch reviews, and potentially explore other functionalities offered by the API.
Udemy API Support
Pydemy currently supports the Udemy Affiliate API v2.0. This API allows developers to access public information about Udemy courses.
Note: The Udemy Instructor API, which provides functionalities specific to course creation and management, is not currently supported by Pydemy.
Main Features
- Synchronous and Asynchronous API Requests: Choose between synchronous and asynchronous interactions with the Udemy API. This flexibility caters to different development needs and preferences. To enhance application performance, for example, employ asynchronous calls for non-blocking activities.
- Search for Courses: Quickly find courses using a variety of parameters, such as price filters, categories, or keywords.
- Get Detailed Course Information: Get in-depth information on a particular course, such as the title, curriculum, teacher, ratings, and more.
- Get Course Reviews: By retrieving and examining reviews for a specific course, you can learn a great deal about the experiences of students.
- Use Pydantic for Data Management and Validation: The
pydemylibrary makes extensive use of the potent Pydantic library. It offers an organized method of working with the data and guarantees that the information obtained from the Udemy API is accurate. This facilitates robust interactions with the Udemy API and makes programming easier.
Getting Started
-
Obtain API Credentials: Visit Udemy API Clients to create a new API client and obtain your
clientIDandclientSecret. -
Installation: Install the library using pip:
pip install pydemy
-
Usage: Import the
UdemyClientclass:from pydemy import UdemyClient
Initialize the client with your API credentials:
client_id = "YOUR_CLIENT_ID" client_secret = "YOUR_CLIENT_SECRET" client = UdemyClient(client_id=client_id, client_secret=client_secret)
Quickstart
Here is an example that demonstrates how to get started with using the UdemyClient to retrieve information about public courses.
For more in-depth examples and usage scenarios, be sure to check out the examples folder.
client = UdemyClient(client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET")
# Get a list of public courses (replace '4534650' with a specific course ID for details)
courses = client.get_public_curriculum_list(course_id=4534650)
# Print course titles
for course in courses:
print(course.title)
Contributing
We welcome contributions from the community! If you have bug fixes, improvements, or new features, feel free to submit a pull request. For detailed guidelines on contributing, please refer to the CONTRIBUTING.rst file.
Here's a brief overview:
- Fork the repository.
- Create a new branch for your changes.
- Implement your changes and add unit tests if applicable.
- Follow consistent coding style.
- Submit a pull request with a clear description of your changes.
License
This project is licensed under the MIT License - see the LICENSE.md file for details.
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
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 pydemy-0.2.9.tar.gz.
File metadata
- Download URL: pydemy-0.2.9.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca148a526d720b7731bd154c5477e026602ea30ebd20952046969b1829a7f79f
|
|
| MD5 |
81c3efd5aa4f03997cba2c829f04dd99
|
|
| BLAKE2b-256 |
fd6f5d00ec5e8baf3a8e72d2e17639df290c55b7519e71e0ddd2253f4d5cb85f
|
Provenance
The following attestation bundles were made for pydemy-0.2.9.tar.gz:
Publisher:
release_pypi.yml on robelasefa/pydemy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pydemy-0.2.9.tar.gz -
Subject digest:
ca148a526d720b7731bd154c5477e026602ea30ebd20952046969b1829a7f79f - Sigstore transparency entry: 621680492
- Sigstore integration time:
-
Permalink:
robelasefa/pydemy@017e7b4da7ddc73ed6dee80bfe461af7fe021028 -
Branch / Tag:
refs/tags/v0.2.9 - Owner: https://github.com/robelasefa
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release_pypi.yml@017e7b4da7ddc73ed6dee80bfe461af7fe021028 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pydemy-0.2.9-py3-none-any.whl.
File metadata
- Download URL: pydemy-0.2.9-py3-none-any.whl
- Upload date:
- Size: 19.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04f8bcd8581373a7844284b5550dab3136c4659c4235071f2b24f3b0451e5a36
|
|
| MD5 |
35b8d5f861e7eeda520c384d11454ce4
|
|
| BLAKE2b-256 |
0180fcddf2a20ae191dd5103221c84b70503fe115c7f5e62dd803c142ac0a662
|
Provenance
The following attestation bundles were made for pydemy-0.2.9-py3-none-any.whl:
Publisher:
release_pypi.yml on robelasefa/pydemy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pydemy-0.2.9-py3-none-any.whl -
Subject digest:
04f8bcd8581373a7844284b5550dab3136c4659c4235071f2b24f3b0451e5a36 - Sigstore transparency entry: 621680496
- Sigstore integration time:
-
Permalink:
robelasefa/pydemy@017e7b4da7ddc73ed6dee80bfe461af7fe021028 -
Branch / Tag:
refs/tags/v0.2.9 - Owner: https://github.com/robelasefa
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release_pypi.yml@017e7b4da7ddc73ed6dee80bfe461af7fe021028 -
Trigger Event:
push
-
Statement type: