Metadata-Version: 2.1
Name: brainly-api
Version: 0.1.1
Summary: The ultimate HTTP library designed to communicate with the Brainly APIs
Home-page: https://github.com/vlaex/brainly-api-python
License: MIT
Keywords: api,brainly,brainly api,znanija,nosdevoirs,brainly.com,znanija.com
Author: vlaex
Requires-Python: >=3.11,<4.0
Classifier: Development Status :: 1 - Planning
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: httpx[http2] (>=0.27.0,<0.28.0)
Project-URL: Repository, https://github.com/vlaex/brainly-api-python
Description-Content-Type: text/markdown

# Brainly API Client

[![PyPI](https://img.shields.io/pypi/v/brainly-api.svg)](https://pypi.python.org/pypi/brainly-api)

The ultimate Python library to access the **[Brainly REST API](https://brainly.com/api/28)** and **[Brainly GraphQL API](https://brainly.com/graphql/us)**

All Brainly markets supported. Async by default.

## Install

```bash
pip install brainly-api
```

## Usage

```python
from brainly_api import BrainlyAPI

api = BrainlyAPI(
    token="XXXXXX", # token long
    market="dd",
    legacy_api_host="http://ru.data.api.z-dn.net",
    graphql_api_host="https://graphql.z-dn.net"
)

# ...

user = await api.get_user(34)
print(user)
```

## Notes

This is not an official API wrapper affiliated with Brainly.

The Brainly API is undocumented, so this library only contains well-known publicly accessible API endpoints.

### I'm getting blocked by Brainly

Brainly is blocking automated requests.

This library uses plain HTTP requests with no anti-blocking strategy, so if you're trying to access publicly known Brainly hosts (e.g., https://brainly.com/api/28), you may be getting blocked.

If you want unblocked access to Brainly APIs, please [contact me](https://t.me/vlaex)
