Metadata-Version: 2.1
Name: pydemy
Version: 0.1.1
Summary: A Python library for interacting with the Udemy Affiliate API.
Home-page: https://github.com/robelasefa/pydemy
Author: Robel Asefa
Author-email: Robel Asefa <mertigenet@gmail.com>
Project-URL: Homepage, https://github.com/robelasefa/pydemy
Project-URL: Issues, https://github.com/robelasefa/pydemy/issues
Keywords: udemy,api,courses,education
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Education
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENCE
Requires-Dist: requests~=2.32.3
Requires-Dist: pydantic~=2.8.2
Provides-Extra: dev
Requires-Dist: black; extra == "dev"
Requires-Dist: isort; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: pylint; extra == "dev"

# Pydemy

Pydemy provides a convenient way to interact with the **[Udemy Affiliate API](https://www.udemy.com/developers/affiliate)** 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](https://www.udemy.com/developers/instructor/), which provides functionalities specific to course creation and management, is not currently supported by Pydemy.

## Main Features

- **Search for Courses**: Easily search for courses based on various criteria like keywords, categories, or
  price filters.
- **Get Detailed Course Information**: Retrieve comprehensive details about a specific course, including
  title, instructor, ratings, curriculum, and more.
- **Fetch Course Reviews**: Gain valuable insights into student experiences by fetching and analyzing reviews
  for particular course.

## Getting Started

1. **Obtain API Credentials**:
   Visit [Udemy API Clients](https://www.udemy.com/user/edit-api-clients/) to create a new API client and obtain your `clientID` and `clientSecret`.

2. **Installation**:
   Install the library using pip:

   ```bash
   pip install pydemy
   ```

3. **Usage**:
   Import the `UdemyClient` class:

   ```python
   from pydemy import UdemyClient
   ```

   Initialize the client with your API credentials:

   ```python
   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 use the `UdemyClient` instance to retrieve information about public courses.

```python
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](https://github.com/robelasefa/pydemy/blob/main/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](https://github.com/robelasefa/pydemy/blob/main/LICENSE)** file for details.
