Skip to content

Commit

Permalink
Add back in Python (#150)
Browse files Browse the repository at this point in the history
* Add back in Python

* readme update

* Update version
  • Loading branch information
jiajames authored Apr 12, 2024
1 parent 748e972 commit ecd2abf
Show file tree
Hide file tree
Showing 134 changed files with 11,746 additions and 2 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,20 @@
## v4-client-js
The dYdX Chain Client Typescript client is used for placing transactions and querying the dYdX chain.

## v4-client-py
Python client for dYdX Chain. Huge thanks to [kaloureyes3](https://github.com/kaloureyes3/v4-clients) for helping us
maintain this!

The library is currently tested against Python versions 3.9, and 3.11.

## v4-client-cpp (Third Party Client)
To pull the latest C++ client, run `git submodule update --init --recursive`

This client was originally developed and open-sourced through a grant by the dYdX Grants Trust — an
unaffiliated and independent third-party from dYdX Trading Inc.

The original client can be found [here](https://github.com/asnefedovv/dydx-v4-client-cpp).

# Third-party Clients

[Python Client](https://github.com/kaloureyes3/v4-clients/tree/main/v4-client-py)

By clicking the above links to third-party clients, you will leave the dYdX Trading Inc. (“dYdX”) GitHub repository and join repositories made available by third parties, which are independent from and unaffiliated with dYdX. dYdX is not responsible for any action taken or content on third-party repositories.
132 changes: 132 additions & 0 deletions v4-client-py/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# IDE
.idea/
19 changes: 19 additions & 0 deletions v4-client-py/.gitleaks.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Title for the gitleaks configuration file.
title = "Gitleaks title"

[extend]
# useDefault will extend the base configuration with the default gitleaks config:
# https://github.com/zricethezav/gitleaks/blob/master/config/gitleaks.toml
useDefault = true

[allowlist]
paths = [
'''gitleaks\.toml''',
'''tests/test_onboarding.py''', # old V3 code
]

regexTarget = "line"
regexes = [
'''clientId''',
'''e92a6595c934c991d3b3e987ea9b3125bf61a076deab3a9cb519787b7b3e8d77''', # test private key
]
Empty file added v4-client-py/.gitleaksignore
Empty file.
17 changes: 17 additions & 0 deletions v4-client-py/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true,
"env": {"PYTHONPATH": "${workspaceFolder}/"}
}
]
}
5 changes: 5 additions & 0 deletions v4-client-py/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"python.linting.pylintEnabled": false,
"python.linting.enabled": false,
"python.linting.pycodestyleEnabled": true
}
Loading

0 comments on commit ecd2abf

Please sign in to comment.