Name | faircompute JSON |
Version |
0.19.0
JSON |
| download |
home_page | |
Summary | A Python client for FairCompute API |
upload_time | 2023-11-21 02:28:58 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.8 |
license | |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Fair Compute Python Client
Fair is a Python client for [Fair Compute](https://faircompute.com) API.
It allows to schedule jobs, monitor their status and retrieve results.
### Creating Fair Account
To use FairCompute Python Client you need to have a Fair account.
Please sign up at https://faircompute.com.
### Launching a job
To launch a job, create a `FairClient` instance and call `run` method.
```python
from fair import FairClient
client = FairClient('http://faircompute:8000', '<email>', '<password>')
client.run(image='alpine', command=['echo', 'hello fair compute'])
```
## Developing Fair
This section is for developers of FairCompute Python client library.
### Prerequisites
Create virtual environment and install requirements.
```shell
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
```
### Testing
By default, testing is done against client running on localhost,
so you need to start the server and at least one compute node locally.
To start the server locally see https://github.com/faircompute/faircompute#running-locally.
Project is using [pytest](https://docs.pytest.org/en/latest/) for testing. To run all tests:
```shell
pytest
```
To run tests against remote server, set `FAIRCOMPUTE_SERVER_URL`, `FAIRCOMPUTE_USER_EMAIL`
and `FAIRCOMPUTE_USER_PASSWORD` environment variables:
```shell
FAIRCOMPUTE_SERVER_URL=http://faircompute:8000 FAIRCOMPUTE_USER_EMAIL=<email> FAIRCOMPUTE_USER_PASSWORD=<password> pytest
```
### Uploading to PyPI
Please follow the instructions at https://packaging.python.org/tutorials/packaging-projects/
Raw data
{
"_id": null,
"home_page": "",
"name": "faircompute",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "",
"author": "",
"author_email": "Dmitry Trifonov <dtrifonov@faircompute.com>",
"download_url": "https://files.pythonhosted.org/packages/62/83/cc203a2b297806f2c6d79ba0aa22bf92e29a8a549adcf3c4f28193cb0884/faircompute-0.19.0.tar.gz",
"platform": null,
"description": "# Fair Compute Python Client\n\nFair is a Python client for [Fair Compute](https://faircompute.com) API.\nIt allows to schedule jobs, monitor their status and retrieve results.\n\n### Creating Fair Account\n\nTo use FairCompute Python Client you need to have a Fair account.\nPlease sign up at https://faircompute.com.\n\n### Launching a job\n\nTo launch a job, create a `FairClient` instance and call `run` method.\n\n```python\nfrom fair import FairClient\n\nclient = FairClient('http://faircompute:8000', '<email>', '<password>')\nclient.run(image='alpine', command=['echo', 'hello fair compute'])\n```\n\n## Developing Fair\n\nThis section is for developers of FairCompute Python client library.\n\n### Prerequisites\n\nCreate virtual environment and install requirements.\n```shell\npython3 -m venv venv\nsource venv/bin/activate\npip install -r requirements.txt\n```\n\n### Testing\n\nBy default, testing is done against client running on localhost,\nso you need to start the server and at least one compute node locally.\nTo start the server locally see https://github.com/faircompute/faircompute#running-locally.\n\nProject is using [pytest](https://docs.pytest.org/en/latest/) for testing. To run all tests:\n```shell\npytest\n```\n\nTo run tests against remote server, set `FAIRCOMPUTE_SERVER_URL`, `FAIRCOMPUTE_USER_EMAIL`\nand `FAIRCOMPUTE_USER_PASSWORD` environment variables:\n```shell\nFAIRCOMPUTE_SERVER_URL=http://faircompute:8000 FAIRCOMPUTE_USER_EMAIL=<email> FAIRCOMPUTE_USER_PASSWORD=<password> pytest\n```\n\n### Uploading to PyPI\n\nPlease follow the instructions at https://packaging.python.org/tutorials/packaging-projects/\n",
"bugtrack_url": null,
"license": "",
"summary": "A Python client for FairCompute API",
"version": "0.19.0",
"project_urls": {
"Homepage": "https://faircompute.com",
"Issues": "https://discord.gg/zFtVVrSdUz"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9287e7d5a4e2392e945ab2e709f9683a64bd9a6733674ea88b122197d1970ed1",
"md5": "ef3e6c933b0ffd06a06f720668895099",
"sha256": "3c7b4ebb87b078f8d922b789d387da1cca6e5cda92a0e29c5730761c203b61a3"
},
"downloads": -1,
"filename": "faircompute-0.19.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ef3e6c933b0ffd06a06f720668895099",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 5046,
"upload_time": "2023-11-21T02:28:56",
"upload_time_iso_8601": "2023-11-21T02:28:56.659549Z",
"url": "https://files.pythonhosted.org/packages/92/87/e7d5a4e2392e945ab2e709f9683a64bd9a6733674ea88b122197d1970ed1/faircompute-0.19.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6283cc203a2b297806f2c6d79ba0aa22bf92e29a8a549adcf3c4f28193cb0884",
"md5": "b96ff19dabca161f2888d6fef100bb36",
"sha256": "b22f4b9e947f8770498c7b7cc82544c0a94bf31b4e2c915b98e91db6df5620fe"
},
"downloads": -1,
"filename": "faircompute-0.19.0.tar.gz",
"has_sig": false,
"md5_digest": "b96ff19dabca161f2888d6fef100bb36",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 4881,
"upload_time": "2023-11-21T02:28:58",
"upload_time_iso_8601": "2023-11-21T02:28:58.452780Z",
"url": "https://files.pythonhosted.org/packages/62/83/cc203a2b297806f2c6d79ba0aa22bf92e29a8a549adcf3c4f28193cb0884/faircompute-0.19.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-21 02:28:58",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "faircompute"
}