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.7.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pydemy-0.2.7.tar.gz
Algorithm Hash digest
SHA256 64f03ae45e481b8ea509531195ca081735ed086d122dc82b312b294ec249bab7
MD5 2473ba3ad2d8d309b0f6175221260d8f
BLAKE2b-256 fd1f637966920a953625f3bd8ee4274b1f7c69553f53f9ce2186bf14d03c885f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydemy-0.2.7.tar.gz:

Publisher: release_pypi.yml on robelasefa/pydemy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

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

File hashes

Hashes for pydemy-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 fe9e7faedcdcc03c4bd48287b5ca4a5d477867af2a232b081b62de700547c1c4
MD5 17b404fa620a4afcb96775d7e82c940b
BLAKE2b-256 ce1d3d1089d8f8df2f17043c2c6eaed6cfde71c60b43a8a8b3f37a9dcdf9dba0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pydemy-0.2.7-py3-none-any.whl:

Publisher: release_pypi.yml on robelasefa/pydemy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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