Metadata-Version: 2.4
Name: pyolymarket
Version: 0.1.2.post1.dev3
Summary: Python wrapper for the Polymarket Gamma and CLOB APIs, with native and embedding-based event search
Project-URL: Documentation, https://github.com/Niccolo-Bal/pyolymarket
Project-URL: Issues, https://github.com/Niccolo-Bal/pyolymarket
Project-URL: Source, https://github.com/Niccolo-Bal/pyolymarket
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: requests
Requires-Dist: urllib3
Provides-Extra: cache
Requires-Dist: numpy; extra == "cache"
Requires-Dist: pandas; extra == "cache"
Requires-Dist: pyarrow; extra == "cache"
Requires-Dist: alive-progress; extra == "cache"
Provides-Extra: embeddings
Requires-Dist: numpy; extra == "embeddings"
Requires-Dist: openai; extra == "embeddings"
Provides-Extra: search
Requires-Dist: ddgs; extra == "search"
Provides-Extra: trading
Requires-Dist: eth-account; extra == "trading"
Provides-Extra: all
Requires-Dist: pyolymarket[cache,embeddings,search,trading]; extra == "all"
Provides-Extra: docs
Requires-Dist: mkdocs; extra == "docs"
Requires-Dist: mkdocstrings-python; extra == "docs"
Provides-Extra: tests
Requires-Dist: pytest<9,>=8; extra == "tests"
Requires-Dist: pytest-sugar>=0.9.6; extra == "tests"
Dynamic: license-file

<p align="center"> <img src="media/pyoly-logo.png" width="150" height="125" /> </p> 

<br>

# Pyolymarket 

Pyolymarket is a Python wrapper for Polymarket's public Gamma and CLOB APIs. It loads events and markets as objects you can inspect and refresh, optionally caches that catalogue on disk, and searches events by embedding similarity instead of exact keywords. All current features are available with no secretes needed, but Caching requires an OpenAI-compatable embedding model, and future CLOB trading implementation will require CLOB secretes.

## Setup

For installation run:

```shell
pip install pyolymarket
```

Embedding search needs an OpenAI-compatible key in `PYOLY_OPENAI_API_KEY`.

CLOB usage requires environment variables at: `PYOLY_CLOB_API_KEY`, `PYOLY_CLOB_SECRET`,`PYOLY_CLOB_PASSPHRASE`, `PYOLY_CLOB_ADDRESS`, and `PYOLY_CLOB_PRIVATE_KEY`.

If you already have these variables set, you can change the endpoints using `pyoly.config`:

```python
import pyolymarket as pyoly

pyoly.config.CLOB_API_KEY_ENV = "MY_SILLY_CLOB_API_KEY"
```

### If forking
Clone this repo, then build with: 

```shell
python -m build 
```

And install the library directly through the wheel:

```shell
pip install dist/<.whl file>
```

## Example Usage

Worked examples live in `tests/` 

## Version

Currently in `v0.1.2`.

Most recent changes:
- Added native API search
- Added CLOB parsing + integration
- Bug fixes

## Documentation

### [GitPages documentation](tbd) - In progress

### [PyPi web page](https://pypi.org/project/pyolymarket/)
