faircompute


Namefaircompute JSON
Version 0.22.1 PyPI version JSON
download
home_page
SummaryA Python client for FairCompute API
upload_time2024-01-18 02:23:24
maintainer
docs_urlNone
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/

```shell
rm -rf dist
python3 -m build
python3 -m twine upload --repository testpypi dist/*
python3 -m twine upload dist/*
```

            

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/30/58/6523f9240e38f53154938e21c1769913be4b3b2e01d9a7b58fe14a2e02e8/faircompute-0.22.1.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\n```shell\nrm -rf dist\npython3 -m build\npython3 -m twine upload --repository testpypi dist/*\npython3 -m twine upload dist/*\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A Python client for FairCompute API",
    "version": "0.22.1",
    "project_urls": {
        "Homepage": "https://faircompute.com",
        "Issues": "https://discord.gg/zFtVVrSdUz"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "144be15896a40d2728a11d60e636e2d8157570014a179cde5930bb1abf2c7594",
                "md5": "004f0af18a54e9653d6a0b9103bab0a8",
                "sha256": "4862366c15dd1c40b1fc289ae339fbec2644d2c647c3bf8f79b808abf94a2949"
            },
            "downloads": -1,
            "filename": "faircompute-0.22.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "004f0af18a54e9653d6a0b9103bab0a8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 5720,
            "upload_time": "2024-01-18T02:23:23",
            "upload_time_iso_8601": "2024-01-18T02:23:23.284923Z",
            "url": "https://files.pythonhosted.org/packages/14/4b/e15896a40d2728a11d60e636e2d8157570014a179cde5930bb1abf2c7594/faircompute-0.22.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "30586523f9240e38f53154938e21c1769913be4b3b2e01d9a7b58fe14a2e02e8",
                "md5": "833b0c1c9b2bb6c6089aa17da6205e85",
                "sha256": "ba9961f510a34ab2b0bf24f32346fe374321ddfc1639f3df55628816112fdf59"
            },
            "downloads": -1,
            "filename": "faircompute-0.22.1.tar.gz",
            "has_sig": false,
            "md5_digest": "833b0c1c9b2bb6c6089aa17da6205e85",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 5311,
            "upload_time": "2024-01-18T02:23:24",
            "upload_time_iso_8601": "2024-01-18T02:23:24.910169Z",
            "url": "https://files.pythonhosted.org/packages/30/58/6523f9240e38f53154938e21c1769913be4b3b2e01d9a7b58fe14a2e02e8/faircompute-0.22.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-18 02:23:24",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "faircompute"
}
        
Elapsed time: 0.14974s