# Noko Client
[![Documentation Status](https://readthedocs.org/projects/python-freckle-client/badge/?version=latest)](https://python-freckle-client.readthedocs.io/en/latest/?badge=latest)
A simple Noko (formerly Freckle) API client implementation. Offers two different clients with different levels of flexibility
to interact with the Noko API v2.
Full documentation on the NokoClient can be found [here](https://python-freckle-client.readthedocs.io/en/latest/).
<!-- HIDE_INTRO -->
## Installation
To get the latest stable release from PyPi:
```shell
pip install python-freckle-client
```
**Requirements:**
Version `v0.5.0` and lower requires at least Python 3.8. Version `v1.0.0` and upper require Python 3.10 and Pydantic v2.
## Usage
The package offers three different clients:
- NokoClient (Noko's v2 API)
- FreckleClientV2 (Noko's v2 API)
- FreckleClient (Noko's v1 API) <- Deprecated!
To use the `NokoClient`, just import the client, create an instance and call the desired method:
```python
from noko_client.client import NokoClient
client = NokoClient('access_token')
entries = client.list_entries(from_="2023-08-01", to=datetime(2023, 8, 15))
```
To use the `FreckleClient` or the `FreckleClientV2`, just import the client, create an instance and call the `fetch_json` method:
```python
from freckle_client.client import FreckleClient
client = FreckleClient('account_name', 'api_token')
entries = client.fetch_json(
'entries',
query_params={
'per_page': 1000,
'search[from]': '2015-01-01',
'search[to]': '2015-01-31',
'search[projects]': [1423, 24545, ],
}
)
```
Similarly, to use the V2 API:
```python
from freckle_client.client import FreckleClientV2
client = FreckleClientV2('access_token')
entries = client.fetch_json(
'entries',
query_params={
'from': '2015-01-01',
'to': '2015-01-31',
'billable': 'true',
'project_ids': '12345,67890'
}
)
```
## Contribute
If you want to contribute to this project, please fork this repository and clone your fork, then set up a virtual environment:
```shell
virtualenv -p 3.10 venv
source venv/bin/activate
pip install -r requirements-dev.txt
```
Create a new branch, implement your feature or fix, and send us a pull request.
Raw data
{
"_id": null,
"home_page": "https://github.com/ombulabs/python-freckle-client",
"name": "python-freckle-client",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "nokotime,noko,api,client,freckle",
"author": "OmbuLabs - The Lean Software Boutique, LLC",
"author_email": "hello@ombulabs.com",
"download_url": "https://files.pythonhosted.org/packages/4d/c8/4ea7994d5d0a937501c18d949777dc0f49c964d59e8daab6c1d0819a794d/python-freckle-client-1.1.2.tar.gz",
"platform": "OS Independent",
"description": "# Noko Client\n\n[![Documentation Status](https://readthedocs.org/projects/python-freckle-client/badge/?version=latest)](https://python-freckle-client.readthedocs.io/en/latest/?badge=latest)\n\nA simple Noko (formerly Freckle) API client implementation. Offers two different clients with different levels of flexibility\nto interact with the Noko API v2.\n\nFull documentation on the NokoClient can be found [here](https://python-freckle-client.readthedocs.io/en/latest/).\n\n<!-- HIDE_INTRO -->\n## Installation\n\nTo get the latest stable release from PyPi:\n\n```shell\npip install python-freckle-client\n```\n\n**Requirements:**\n\nVersion `v0.5.0` and lower requires at least Python 3.8. Version `v1.0.0` and upper require Python 3.10 and Pydantic v2.\n\n## Usage\n\nThe package offers three different clients:\n\n- NokoClient (Noko's v2 API)\n- FreckleClientV2 (Noko's v2 API)\n- FreckleClient (Noko's v1 API) <- Deprecated!\n\nTo use the `NokoClient`, just import the client, create an instance and call the desired method:\n\n```python\nfrom noko_client.client import NokoClient\n\nclient = NokoClient('access_token')\nentries = client.list_entries(from_=\"2023-08-01\", to=datetime(2023, 8, 15))\n```\n\nTo use the `FreckleClient` or the `FreckleClientV2`, just import the client, create an instance and call the `fetch_json` method: \n\n```python\nfrom freckle_client.client import FreckleClient\n\nclient = FreckleClient('account_name', 'api_token')\nentries = client.fetch_json(\n 'entries',\n query_params={\n 'per_page': 1000,\n 'search[from]': '2015-01-01',\n 'search[to]': '2015-01-31',\n 'search[projects]': [1423, 24545, ],\n }\n)\n```\n\nSimilarly, to use the V2 API:\n\n```python\nfrom freckle_client.client import FreckleClientV2\n\nclient = FreckleClientV2('access_token')\nentries = client.fetch_json(\n 'entries',\n query_params={\n 'from': '2015-01-01',\n 'to': '2015-01-31',\n 'billable': 'true',\n 'project_ids': '12345,67890'\n }\n)\n```\n\n\n## Contribute\n\nIf you want to contribute to this project, please fork this repository and clone your fork, then set up a virtual environment:\n\n```shell\nvirtualenv -p 3.10 venv\nsource venv/bin/activate\npip install -r requirements-dev.txt\n```\n\nCreate a new branch, implement your feature or fix, and send us a pull request.\n",
"bugtrack_url": null,
"license": "The MIT License",
"summary": "A super simple Freckle/Noko API client implementation.",
"version": "1.1.2",
"project_urls": {
"Homepage": "https://github.com/ombulabs/python-freckle-client"
},
"split_keywords": [
"nokotime",
"noko",
"api",
"client",
"freckle"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "19d775555fdd534eda5c928c2484e0c5947bb42b05983fe1d0afc1e796f7f673",
"md5": "bb2e6a4122f863a62659d75b6018b15b",
"sha256": "22ee21d2960e0b0f50714ecb6594b2586dc06b8628fa9fd701ee68b4051673e7"
},
"downloads": -1,
"filename": "python_freckle_client-1.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bb2e6a4122f863a62659d75b6018b15b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 28595,
"upload_time": "2024-03-05T16:13:46",
"upload_time_iso_8601": "2024-03-05T16:13:46.167479Z",
"url": "https://files.pythonhosted.org/packages/19/d7/75555fdd534eda5c928c2484e0c5947bb42b05983fe1d0afc1e796f7f673/python_freckle_client-1.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4dc84ea7994d5d0a937501c18d949777dc0f49c964d59e8daab6c1d0819a794d",
"md5": "a11a5299e7628b91f54631ac8754cc73",
"sha256": "88d4fabbb38a6a89364f75a57e0d87d739e58e87660efb0ed1ff986669190ae5"
},
"downloads": -1,
"filename": "python-freckle-client-1.1.2.tar.gz",
"has_sig": false,
"md5_digest": "a11a5299e7628b91f54631ac8754cc73",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 23644,
"upload_time": "2024-03-05T16:13:47",
"upload_time_iso_8601": "2024-03-05T16:13:47.929212Z",
"url": "https://files.pythonhosted.org/packages/4d/c8/4ea7994d5d0a937501c18d949777dc0f49c964d59e8daab6c1d0819a794d/python-freckle-client-1.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-05 16:13:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ombulabs",
"github_project": "python-freckle-client",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "python-freckle-client"
}