# Frontrunner SDK
[Frontrunner][frontrunner] is the first zero gas fee, decentralized sports
prediction market built on blockchain where you get the best odds with no house
edge.
[frontrunner]: https://www.getfrontrunner.com/
This is an SDK which allows you to interact with our public-facing API easily
via Python.
## Developer
Note: this assumes OSX
### Prerequisite Installation
Install [`brew`][brew]. This will be used to install other required tooling.
[brew]: https://brew.sh/
Install [Visual Studio Code][vscode]. This repository has configuration for
vscode to make the development experience uniform and smooth for everyone.
[vscode]: https://code.visualstudio.com/
```sh
brew install --cask visual-studio-code
```
Install [`pants`][pants]. Pants is a generic build tool that supports multiple
languages and tools. Both local builds and CI builds use Pants.
[pants]: https://www.pantsbuild.org/docs/welcome-to-pants
```sh
brew install pantsbuild/tap/pants
```
Clone the repository. Then, open up the repository in vscode.
[Install the recommended extensions][install-recommended-extensions] for this
workspace. Restart vscode.
[install-recommended-extensions]: https://code.visualstudio.com/docs/editor/extension-marketplace#_workspace-recommended-extensions
In a terminal at the root of the repository, test your setup by running...
```sh
pants lint ::
pants check ::
pants test ::
```
To make vscode use the correct Python environment, in a terminal, run...
```sh
pants export ::
```
To activate the virtual environment in a shell, run...
```sh
bash ./dist/export/python/virtualenv/3.8.16/bin/activate
```
### Codegen
Generate Python code using the remote `openapi.json` and [swagger-codegen][swagger-codegen].
[swagger-codegen]: https://github.com/swagger-api/swagger-codegen
#### Installation
```sh
brew install swagger-codegen
```
#### Adding a Client
1. Add a dir under `openapi`
2. Put the API's `openapi.json` in that directory
3. Run `./scripts/codegen.sh`
#### Getting Help
To see additional options:
```sh
swagger-codegen generate --help
swagger-codegen config-help -l python
```
### Running Tests
To test everything, run...
```sh
pants test ::
```
To test a single file, run...
```sh
pants test --no-use-coverage ${file}
```
### Auto Format Code
To format everything and fix the code for Flake8, run...
```sh
pants fmt ::
pants fix ::
```
### Local Testing via REPL
To get a Python shell to test code, [comment out the `python_distribution` target][pants-16985] in `/BUILD`. Then run...
```sh
pants repl ::
```
[pants-16985]: https://github.com/pantsbuild/pants/issues/16985
### Viewing Docs
To view docs generated from the `docs` folder, run...
```sh
./scripts/slate.sh serve
```
Then, in a browser, open http://localhost:8000.
### Building Docs Locally
To build docs locally, run...
```sh
./scripts/slate.sh build
```
## Deployments and Releases
### Developer Documentation
The slate documentation deploys on every `master` branch merge.
### Release Process
1. 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][new-release-form] to create the release. Make sure it is marked as **pre-release**.
1. Install the SDK from TestPyPI: `pip install --upgrade --index-url https://test.pypi.org/simple/ frontrunner-sdk`.
1. Edit the release -- remove the checkmark from "Set as a pre-release" and save.
1. Install the SDK from PyPI (production): `pip install --upgrade frontrunner-sdk`
[new-release-form]: https://github.com/GetFrontrunner/frontrunner-sdk/releases/new
Test PyPI: https://test.pypi.org/project/frontrunner-sdk/
Prod PyPI: https://pypi.org/project/frontrunner-sdk/
Raw data
{
"_id": null,
"home_page": "https://github.com/GetFrontrunner/frontrunner-sdk",
"name": "frontrunner-sdk",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9,<3.11",
"maintainer_email": "",
"keywords": "",
"author": "Frontrunner",
"author_email": "support@getfrontrunner.com",
"download_url": "https://files.pythonhosted.org/packages/8c/fe/7f4474514da39b8381eaed931a17c72d9bc5afb1cdc0a5fd83dcd180761e/frontrunner-sdk-0.8.4.tar.gz",
"platform": null,
"description": "# Frontrunner SDK\n\n[Frontrunner][frontrunner] is the first zero gas fee, decentralized sports\nprediction market built on blockchain where you get the best odds with no house\nedge.\n\n[frontrunner]: https://www.getfrontrunner.com/\n\nThis is an SDK which allows you to interact with our public-facing API easily\nvia Python.\n\n## Developer\n\nNote: this assumes OSX\n\n### Prerequisite Installation\n\nInstall [`brew`][brew]. This will be used to install other required tooling.\n\n[brew]: https://brew.sh/\n\nInstall [Visual Studio Code][vscode]. This repository has configuration for\nvscode to make the development experience uniform and smooth for everyone.\n\n[vscode]: https://code.visualstudio.com/\n\n```sh\nbrew install --cask visual-studio-code\n```\n\nInstall [`pants`][pants]. Pants is a generic build tool that supports multiple\nlanguages and tools. Both local builds and CI builds use Pants.\n\n[pants]: https://www.pantsbuild.org/docs/welcome-to-pants\n\n```sh\nbrew install pantsbuild/tap/pants\n```\n\nClone the repository. Then, open up the repository in vscode.\n[Install the recommended extensions][install-recommended-extensions] for this\nworkspace. Restart vscode.\n\n[install-recommended-extensions]: https://code.visualstudio.com/docs/editor/extension-marketplace#_workspace-recommended-extensions\n\nIn a terminal at the root of the repository, test your setup by running...\n\n```sh\npants lint ::\npants check ::\npants test ::\n```\n\nTo make vscode use the correct Python environment, in a terminal, run...\n\n```sh\npants export ::\n```\n\nTo activate the virtual environment in a shell, run...\n\n```sh\nbash ./dist/export/python/virtualenv/3.8.16/bin/activate\n```\n\n### Codegen\n\nGenerate Python code using the remote `openapi.json` and [swagger-codegen][swagger-codegen].\n\n[swagger-codegen]: https://github.com/swagger-api/swagger-codegen\n\n#### Installation\n\n```sh\nbrew install swagger-codegen\n```\n\n#### Adding a Client\n\n1. Add a dir under `openapi`\n2. Put the API's `openapi.json` in that directory\n3. Run `./scripts/codegen.sh`\n\n#### Getting Help\n\nTo see additional options:\n\n```sh\nswagger-codegen generate --help\nswagger-codegen config-help -l python\n```\n\n### Running Tests\n\nTo test everything, run...\n\n```sh\npants test ::\n```\n\nTo test a single file, run...\n\n```sh\npants test --no-use-coverage ${file}\n```\n\n### Auto Format Code\n\nTo format everything and fix the code for Flake8, run...\n\n```sh\npants fmt ::\npants fix ::\n```\n\n### Local Testing via REPL\n\nTo get a Python shell to test code, [comment out the `python_distribution` target][pants-16985] in `/BUILD`. Then run...\n\n```sh\npants repl ::\n```\n\n[pants-16985]: https://github.com/pantsbuild/pants/issues/16985\n\n### Viewing Docs\n\nTo view docs generated from the `docs` folder, run...\n\n```sh\n./scripts/slate.sh serve\n```\n\nThen, in a browser, open http://localhost:8000.\n\n### Building Docs Locally\n\nTo build docs locally, run...\n\n```sh\n./scripts/slate.sh build\n```\n\n## Deployments and Releases\n\n### Developer Documentation\n\nThe slate documentation deploys on every `master` branch merge.\n\n### Release Process\n\n1. 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][new-release-form] to create the release. Make sure it is marked as **pre-release**.\n1. Install the SDK from TestPyPI: `pip install --upgrade --index-url https://test.pypi.org/simple/ frontrunner-sdk`.\n1. Edit the release -- remove the checkmark from \"Set as a pre-release\" and save.\n1. Install the SDK from PyPI (production): `pip install --upgrade frontrunner-sdk`\n\n[new-release-form]: https://github.com/GetFrontrunner/frontrunner-sdk/releases/new\n\nTest PyPI: https://test.pypi.org/project/frontrunner-sdk/\nProd PyPI: https://pypi.org/project/frontrunner-sdk/\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Frontrunner SDK",
"version": "0.8.4",
"project_urls": {
"Homepage": "https://github.com/GetFrontrunner/frontrunner-sdk"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "67c2464bb9123bdb7ddaf73fa62585a9542ba64739abea7539fbab2a190ec6f4",
"md5": "b7579c36230f0b7b1cfcb0b9acb09363",
"sha256": "8fb89da7a151de8f099f3718d0c217fe216aa373376e0dbabd63c343052fa1ae"
},
"downloads": -1,
"filename": "frontrunner_sdk-0.8.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b7579c36230f0b7b1cfcb0b9acb09363",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9,<3.11",
"size": 93179,
"upload_time": "2023-08-24T16:40:50",
"upload_time_iso_8601": "2023-08-24T16:40:50.196018Z",
"url": "https://files.pythonhosted.org/packages/67/c2/464bb9123bdb7ddaf73fa62585a9542ba64739abea7539fbab2a190ec6f4/frontrunner_sdk-0.8.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8cfe7f4474514da39b8381eaed931a17c72d9bc5afb1cdc0a5fd83dcd180761e",
"md5": "82eebc489fc31a31a17e60070ba14968",
"sha256": "ea9a9020c1559cbf93048a5c6c18251f1f492d86b57fbed160ccd8425e1062ba"
},
"downloads": -1,
"filename": "frontrunner-sdk-0.8.4.tar.gz",
"has_sig": false,
"md5_digest": "82eebc489fc31a31a17e60070ba14968",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9,<3.11",
"size": 47960,
"upload_time": "2023-08-24T16:40:51",
"upload_time_iso_8601": "2023-08-24T16:40:51.476013Z",
"url": "https://files.pythonhosted.org/packages/8c/fe/7f4474514da39b8381eaed931a17c72d9bc5afb1cdc0a5fd83dcd180761e/frontrunner-sdk-0.8.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-24 16:40:51",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "GetFrontrunner",
"github_project": "frontrunner-sdk",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"tox": true,
"lcname": "frontrunner-sdk"
}