bob3client


Namebob3client JSON
Version 0.0.1 PyPI version JSON
download
home_pageNone
SummaryLightweight bob3 client utilities
upload_time2024-11-18 08:29:21
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseNone
keywords bob3 projects
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # bob3 client for python

This is a python client for the bob3 API endpoints. It is lightweight utility to provide
easier access to the API endpoints.

## Installation

```bash
pip install bob3client
```

## Usage

To authenticate against the API you must have a private RSA key file available. This key file
is used to sign the JWT token that is used to authenticate against the API.

Authentication works in such a way that you first register app in the workspace and provide
permissions to it in bob3. There you will need to provide public key of the RSA key pair that
you will use to sign the JWT token. There you also acquire app_id that you will use.

To make easier authentication `bob3client` provides a function `get_auth_token` that will
do all authentication job for you and return already a token that you can use to authenticate
to bob3 API. You will not need to sign JWT token yourself or call `POST /auth` endpoint.

```python
import bob3client

# Acquire an authorization token
# workspace: the workspace name to authorize against
# app_id: the application id that was created in the workspace (see bob3 documentation)
# private_rsa_key_path: the path to the private RSA key file
# Token will expire in 60 minutes by default, to change this use the expire parameter
token = bob3client.get_auth_token('workspace', 'app_id', 'private_rsa_key_path')

# Now you must provide the token in Authorization header to access the API endpoints
# Example using requests library
import requests
headers = {"Authorization": token}
# Get all projects in the workspace where the app is authorized
response = requests.get(bob3client.BOB3_PROD_URL + 'projects', headers=headers)
print(response.json())
```

To get API documentation fetch simply bob3client.BOB3_PROD_URL path in your favorite browser.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "bob3client",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "bob3, projects",
    "author": null,
    "author_email": "Juris Kaminskis <juris.kaminskis@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/1c/66/ffec8110307496c0fae6268f3947c747055ab161fce29b95cad6110eee54/bob3client-0.0.1.tar.gz",
    "platform": null,
    "description": "# bob3 client for python\n\nThis is a python client for the bob3 API endpoints. It is lightweight utility to provide\neasier access to the API endpoints.\n\n## Installation\n\n```bash\npip install bob3client\n```\n\n## Usage\n\nTo authenticate against the API you must have a private RSA key file available. This key file\nis used to sign the JWT token that is used to authenticate against the API.\n\nAuthentication works in such a way that you first register app in the workspace and provide\npermissions to it in bob3. There you will need to provide public key of the RSA key pair that\nyou will use to sign the JWT token. There you also acquire app_id that you will use.\n\nTo make easier authentication `bob3client` provides a function `get_auth_token` that will\ndo all authentication job for you and return already a token that you can use to authenticate\nto bob3 API. You will not need to sign JWT token yourself or call `POST /auth` endpoint.\n\n```python\nimport bob3client\n\n# Acquire an authorization token\n# workspace: the workspace name to authorize against\n# app_id: the application id that was created in the workspace (see bob3 documentation)\n# private_rsa_key_path: the path to the private RSA key file\n# Token will expire in 60 minutes by default, to change this use the expire parameter\ntoken = bob3client.get_auth_token('workspace', 'app_id', 'private_rsa_key_path')\n\n# Now you must provide the token in Authorization header to access the API endpoints\n# Example using requests library\nimport requests\nheaders = {\"Authorization\": token}\n# Get all projects in the workspace where the app is authorized\nresponse = requests.get(bob3client.BOB3_PROD_URL + 'projects', headers=headers)\nprint(response.json())\n```\n\nTo get API documentation fetch simply bob3client.BOB3_PROD_URL path in your favorite browser.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Lightweight bob3 client utilities",
    "version": "0.0.1",
    "project_urls": {
        "Repository": "https://bitbucket.org/u9/3061-bob-3-0/src/develop/"
    },
    "split_keywords": [
        "bob3",
        " projects"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d1141d968fefa2b5c4ba6ce62e17691ddca6dc29d760fe5f256bf006b774be7a",
                "md5": "f93dfb19ca3f4de6c513dba57a10c410",
                "sha256": "10d375b2d9cc8f56c235ae02d7011234d6c6fc1368d957d179f013965c33fcae"
            },
            "downloads": -1,
            "filename": "bob3client-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f93dfb19ca3f4de6c513dba57a10c410",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 3826,
            "upload_time": "2024-11-18T08:29:19",
            "upload_time_iso_8601": "2024-11-18T08:29:19.735317Z",
            "url": "https://files.pythonhosted.org/packages/d1/14/1d968fefa2b5c4ba6ce62e17691ddca6dc29d760fe5f256bf006b774be7a/bob3client-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1c66ffec8110307496c0fae6268f3947c747055ab161fce29b95cad6110eee54",
                "md5": "11e0962fbf59d41b81f3b3b833c90385",
                "sha256": "6e03849673c8e4a797a94012a0a6b8da0de1bf8c2a01caff8d4ce84db9d7fd71"
            },
            "downloads": -1,
            "filename": "bob3client-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "11e0962fbf59d41b81f3b3b833c90385",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 3408,
            "upload_time": "2024-11-18T08:29:21",
            "upload_time_iso_8601": "2024-11-18T08:29:21.592537Z",
            "url": "https://files.pythonhosted.org/packages/1c/66/ffec8110307496c0fae6268f3947c747055ab161fce29b95cad6110eee54/bob3client-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-18 08:29:21",
    "github": false,
    "gitlab": false,
    "bitbucket": true,
    "codeberg": false,
    "bitbucket_user": "u9",
    "bitbucket_project": "3061-bob-3-0",
    "lcname": "bob3client"
}
        
Elapsed time: 0.84382s