pyth-crosschain/express_relay/sdk/python
Anirudh Suresh 92566736da
Express relay python searcher (#1319)
* move js searcher sdk

* add the python searcher sdk

* remove pycache

* create class for simple searcher

* add websocket to python searcher sdk

* finish ws, avoid storing liquidation opportunities within client

* python scripts now working w auto type generation

* minor precommit changes

* address comments 1

* add openapi type generations

* fixed precommit issues on generated type files

* reorg

* fixed openapi_client generated precommit

* fix js filepath issue

* added close ws

* renamings and add send_ws_message method

* get rid of duplicate error parsing

* cleanup

* set up pypi workflow

* address comments

* add python precommit

* changes + precommit changes

* test precommit change

* test precommit change

* test precommit change

* test precommit change

* test precommit change

* test precommit change

* test precommit change

* test precommit change

* test precommit change

* correct directory for poetry in pypi wf

* remove isort

* rename package

* add UUID and some cleanup

* new openapi typings

* add pydantic to pyproj

* more changes

* precommit

* remove extraneous files, stick w actual_instance

* added back http as nondefault

* correction

* some cleanup and reorg

* minor changes

* add back api response typing file

* minorer changes

* exclude openapi_client from end of file fixer

* build internal models via pydantic

* chgs

* start to reorg classes

* configure precommit to work

* some cleanup

* reorg a bit

* address comments

* chgs

* fgt

* morechgs

* some more chgs

---------

Co-authored-by: ani <ani@Anirudhs-MacBook-Pro.local>
Co-authored-by: ani <ani@Anirudhs-MBP.cable.rcn.com>
2024-03-15 15:08:48 -04:00
..
express_relay Express relay python searcher (#1319) 2024-03-15 15:08:48 -04:00
README.md Express relay python searcher (#1319) 2024-03-15 15:08:48 -04:00
mypy.ini Express relay python searcher (#1319) 2024-03-15 15:08:48 -04:00
poetry.lock Express relay python searcher (#1319) 2024-03-15 15:08:48 -04:00
pyproject.toml Express relay python searcher (#1319) 2024-03-15 15:08:48 -04:00

README.md

Express Relay Python SDK

Utility library for searchers and protocols to interact with the Express Relay API.

The SDK includes searcher-side utilities and protocol-side utilities. The searcher-side utilities include a basic Searcher client for connecting to the Express Relay server as well as an example SimpleSearcher class that provides a simple workflow for assessing and bidding on liquidation opportunities.

Searcher

Installation

poetry

$ poetry add express-relay

Quickstart

To run the simple searcher script, navigate to python/ and run

$ python3 -m express_relay.searcher.examples.simple_searcher --private-key <PRIVATE_KEY_HEX_STRING> --chain-id development --verbose --server-url https://per-staging.dourolabs.app/

This simple example runs a searcher that queries the Express Relay liquidation server for available liquidation opportunities and naively submits a bid on each available opportunity.