Frontrunner is the first zero gas fee, decentralized sports prediction market built on blockchain where you get the best odds with no house edge.
This is an SDK which allows you to interact with our public-facing API easily via Python.
Note: this assumes OSX
Install brew. This will be used to install other required tooling.
Install Visual Studio Code. This repository has configuration for vscode to make the development experience uniform and smooth for everyone.
brew install --cask visual-studio-codeInstall pants. Pants is a generic build tool that supports multiple
languages and tools. Both local builds and CI builds use Pants.
brew install pantsbuild/tap/pantsClone the repository. Then, open up the repository in vscode. Install the recommended extensions for this workspace. Restart vscode.
In a terminal at the root of the repository, test your setup by running...
pants lint ::
pants check ::
pants test ::To make vscode use the correct Python environment, in a terminal, run...
pants export ::To activate the virtual environment in a shell, run...
bash ./dist/export/python/virtualenv/3.8.16/bin/activateGenerate Python code using the remote openapi.json and swagger-codegen.
brew install swagger-codegen- Add a dir under
openapi - Put the API's
openapi.jsonin that directory - Run
./scripts/codegen.sh
To see additional options:
swagger-codegen generate --help
swagger-codegen config-help -l pythonTo test everything, run...
pants test ::To test a single file, run...
pants test --no-use-coverage ${file}To format everything and fix the code for Flake8, run...
pants fmt ::
pants fix ::To get a Python shell to test code, comment out the python_distribution target in /BUILD. Then run...
pants repl ::To view docs generated from the docs folder, run...
./scripts/slate.sh serveThen, in a browser, open http://localhost:8000.
To build docs locally, run...
./scripts/slate.sh buildThe slate documentation deploys on every master branch merge.
- Create a tagged release with an appropriate semantic version eg. if the current version is 0.4.2, the next patch version would be 0.4.3, or a next minor version would be 0.5.0. Use the New Release Form to create the release. Make sure it is marked as pre-release.
- Install the SDK from TestPyPI:
pip install --upgrade --index-url https://test.pypi.org/simple/ frontrunner-sdk. - Edit the release -- remove the checkmark from "Set as a pre-release" and save.
- Install the SDK from PyPI (production):
pip install --upgrade frontrunner-sdk
Test PyPI: https://test.pypi.org/project/frontrunner-sdk/ Prod PyPI: https://pypi.org/project/frontrunner-sdk/