Metadata-Version: 2.4
Name: basedflare-session-niquests
Version: 0.2.0
Summary: Provides a niquests-flavored session to solve BasedFlare challenges automatically. It also includes utility functions to solve the challenges manually.
Keywords: basedflare,session,niquests
Author: loynet, abel1502
Author-email: loynet <loynet@protonmail.com>
License-Expression: GPL-3.0-or-later
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Intended Audience :: Developers
Requires-Dist: niquests>=2.32.0
Requires-Dist: argon2-cffi>=23.1.0
Requires-Python: >=3.8
Project-URL: Homepage, https://github.com/abel1502/basedflare-session-niquests
Project-URL: Issues, https://github.com/abel1502/basedflare-session-niquests/issues
Project-URL: Repository, https://github.com/abel1502/basedflare-session-niquests.git
Description-Content-Type: text/markdown

# basedflare-session-niquests

[![PyPI version](https://img.shields.io/pypi/v/basedflare-session-niquests.svg)](https://pypi.org/project/basedflare-session-niquests/)
[![Python versions](https://img.shields.io/pypi/pyversions/basedflare-session-niquests.svg)](https://pypi.org/project/basedflare-session-niquests/)
[![License](https://img.shields.io/pypi/l/basedflare-session-niquests.svg)](LICENSE)

A package that extends [Python's niquests session](https://niquests.readthedocs.io/en/latest/api.html#request-sessions) to solve some [BasedFlare](https://basedflare.com/) Proof of Work (PoW) challenges automatically.
It also includes utility functions to solve the challenges manually.

Please note that **this package is a work in progress** and may not function in all cases.
Currently, it supports the `argon2` and `sha256` PoW challenges.
Any other challenge, such as a CAPTCHA, will raise an exception.

_Fork notice:_ This is a port of [basedflare-session](https://github.com/loynet/basedflare-session/) to [niquests](https://github.com/jawah/niquests). Big thanks to @loynet and @jawah for their work! I intend to maintain this fork up to date with the original package, as well as introduce improvements where applicable.

## Usage

Suppose `example.com` is a website that requires you to solve a challenge before you can access it. Below is a simple
example of how to use the package:

```python
from basedflare_session_niquests import BasedSession

# Create a new session
session = BasedSession()

# Use the session to send a GET request
response = session.get('https://example.com')

# Print the response
print(response.text)
```
