Skip to main content

GRVT Python SDK

Project description

uv logo pre-commit logo ruff logo bandit logo pytest logo

Docker logo GitHub Actions logo

GRVT Python SDK

CodeQL GitHub CI GitHub license


Installation

pip install grvt-pysdk

Usage

There are various ways to use the GRVT Python SDK

Contributor's guide

Table of Contents


Prerequisites


Installation

  1. Clone the git repository

    git clone https://github.com/grvt-technologies/grvt-pysdk.git
    
  2. Go into the project directory

    cd grvt-pysdk/
    
  3. Checkout working branch

    git checkout <branch>
    
  4. Install dependencies

    make install
    
  5. Enable pre-commit hooks

    pre-commit install
    

What's in the box ?

uv

uv is an extremely fast Python package and project manager, written in Rust.

pyproject.toml file (pyproject.toml): orchestrate your project and its dependencies uv.lock file (uv.lock): ensure that the package versions are consistent for everyone working on your project

For more configuration options and details, see the configuration docs.

pre-commit

pre-commit is a framework for managing and maintaining multi-language pre-commit hooks.

.pre-commit-config.yaml file (.pre-commit-config.yaml): describes what repositories and hooks are installed

For more configuration options and details, see the configuration docs.

ruff

ruff is an extremely fast Python linter, written in Rust.

Rules are defined in the pyproject.toml.

For more configuration options and details, see the configuration docs.

mypy

mypy is an optional static type checker for Python that aims to combine the benefits of dynamic (or "duck") typing and static typing.

Rules are defined in the pyproject.toml.

For more configuration options and details, see the configuration docs.

bandit

bandit is a tool designed to find common security issues in Python code.

Rules are defined in the pyproject.toml.

For more configuration options and details, see the configuration docs.

docformatter

docformatter is a tool designed to format docstrings to follow PEP 257.

Options are defined in the .pre-commit-config.yaml.


Testing

We are using pytest & pytest-cov to write tests.

To run tests with coverage:

make test
Output
collected 4 items                                                                                                                                                                                                        

tests/pysdk/test_grvt_api_async.py::test_get_all_instruments PASSED                                                                                                                                                [ 25%]
tests/pysdk/test_grvt_api_async.py::test_open_orders PASSED                                                                                                                                                        [ 50%]
tests/pysdk/test_grvt_api_sync.py::test_get_all_instruments PASSED                                                                                                                                                 [ 75%]
tests/pysdk/test_grvt_api_sync.py::test_open_orders PASSED                                                                                                                                                         [100%]

---------- coverage: platform darwin, python 3.10.15-final-0 ----------
Name                          Stmts   Miss  Cover
-------------------------------------------------
src/pysdk/__init__.py             1      0   100%
src/pysdk/grvt_api_async.py     152    113    26%
src/pysdk/grvt_api_base.py      158     75    53%
src/pysdk/grvt_api_sync.py      152    113    26%
src/pysdk/grvt_env.py            27      4    85%
src/pysdk/types.py              909      0   100%
-------------------------------------------------
TOTAL                          1399    305    78%


=================================================================================================== 4 passed in 1.20s ====================================================================================================

Makefile

We are using Makefile to manage the project.

To see the list of commands:

make
  grvt-pysdk git:(main)  make
help                           Show this help
run                            Run the project
test                           Run the tests
precommit                      Run the pre-commit hooks
lint                           Run the linter
format                         Run the formatter
typecheck                      Run the type checker
security                       Run the security checker
clean                          Clean the project
install                        Install the project
build                          Build the project
publish                        Publish the project

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

grvt_pysdk-0.1.3.tar.gz (159.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

grvt_pysdk-0.1.3-py3-none-any.whl (61.5 kB view details)

Uploaded Python 3

File details

Details for the file grvt_pysdk-0.1.3.tar.gz.

File metadata

  • Download URL: grvt_pysdk-0.1.3.tar.gz
  • Upload date:
  • Size: 159.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.15

File hashes

Hashes for grvt_pysdk-0.1.3.tar.gz
Algorithm Hash digest
SHA256 9f4d17080eee81ea56f78f5ccebd51eaf18baa5d1a541f1a511bf407b4a7b392
MD5 6245464d4802c049d45351ca1df0c7b1
BLAKE2b-256 0c45d486e549773461477ad55fdd3b43336bd8d365084e3cd6ce6dedb2934f2f

See more details on using hashes here.

File details

Details for the file grvt_pysdk-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: grvt_pysdk-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 61.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.15

File hashes

Hashes for grvt_pysdk-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 06619c6b5ac76193c5dcb77ee07ff820277cfcdee354515988b59bb44f60a629
MD5 8e305791b419f16d0e3d641872468d85
BLAKE2b-256 e60f91f90c3ac46eecf80f28fddc655baa4501f4d8f61b0fef457db6d5ecaf21

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page