Skip to main content

A Python library for interacting with the Udemy Affiliate API.

Project description

Pydemy Logo

PyPI version Python versions Udemy API version PyPI Monthly Downloads Publish to PyPI GitHub issues License pre-commit.ci status

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 pydemy library 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

  1. Obtain API Credentials: Visit Udemy API Clients to create a new API client and obtain your clientID and clientSecret.

  2. Installation: Install the library using pip:

    pip install pydemy
    
  3. Usage: Import the UdemyClient class:

    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


Download files

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

Source Distribution

pydemy-0.2.6.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

pydemy-0.2.6-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file pydemy-0.2.6.tar.gz.

File metadata

  • Download URL: pydemy-0.2.6.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for pydemy-0.2.6.tar.gz
Algorithm Hash digest
SHA256 7e1bf4fe5b1916d023295f1d8cac5a369b1cca0e6bdc6fe3e9d88a40da9d6cb8
MD5 313e3628e0f7a2300a803c4675597ba6
BLAKE2b-256 f753d6cc5dd0f66916126cee072b84141fd24238438e5bfbb9078a732148254c

See more details on using hashes here.

File details

Details for the file pydemy-0.2.6-py3-none-any.whl.

File metadata

  • Download URL: pydemy-0.2.6-py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for pydemy-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 6db401dd0f1c979a6ae97a8ad37e5e2f8d2dc6006d5fb2c7c141c37e26ce8793
MD5 1f55ce4f8638776d3cb6ff24e0d54817
BLAKE2b-256 c60851b9deeb80c7ef6ad52602cd09e30eb27df96cb0ad4a4b40ea3097716db6

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