<div align="center">
<img alt="csvbase logo" src="https://github.com/calpaterson/csvbase/raw/main/csvbase/web/static/logo/128x128.png">
</div>
# csvbase-client
The command line client and pandas integration for [csvbase](https://csvbase.com/).
## Status
Semantic versioning is followed, see the [changelog](https://github.com/calpaterson/csvbase-client/blob/main/CHANGELOG.md).
## Usage
### Get a table
In pandas:
```python
>>> import pandas as pd
>>> pd.read_csv("csvbase://meripaterson/stock-exchanges")
>>> pd.read_csv("csvbase://meripaterson/stock-exchanges")
csvbase_row_id Continent Country Name MIC Last changed
0 1 Africa Lesotho HYBSE NaN 2019-03-25
1 2 Asia Kazakhstan Astana International Financial Centre AIXK 2018-11-18
2 3 Africa South Africa ZAR X ZARX 2018-11-18
3 4 South America Argentina Bolsas y Mercados Argentinos NaN 2018-04-02
4 5 North America United States of America Delaware Board of Trade NaN 2018-04-02
.. ... ... ... ... ... ...
246 247 North America United States of America Long-Term Stock Exchange LTSE 2020-09-14
247 248 North America United States of America Miami International Securities Exchange MIHI 2020-09-24
248 249 North America United States of America Members' Exchange NaN 2020-09-24
249 250 Africa Zimbabwe Victoria Falls Stock Exchange NaN 2020-11-01
250 251 Asia China Beijing Stock Exchange NaN 2021-12-27
[251 rows x 6 columns]
```
From the command line
```bash
csvbase-client table get meripaterson/stock-exchanges
csvbase_row_id,Continent,Country,Name,MIC,Last changed
1,Africa,Lesotho,HYBSE,,2019-03-25
2,Asia,Kazakhstan,Astana International Financial Centre,AIXK,2018-11-18
3,Africa,South Africa,ZAR X,ZARX,2018-11-18
[ full file omitted ]
```
### Set (aka "upsert") a table:
```bash
csvbase-client table set meripaterson/stock-exchanges stock-exchanges.csv
```
Nothing is output upon success and exit code is 0.
## Installing
### Executable
Download these from the github [release page](https://github.com/calpaterson/csvbase-client/releases/).
### Pip + PyPI
```bash
pip install csvbase-client
```
### Docker
```bash
docker pull calpaterson/csvbase-client
```
Then when you run:
```bash
# mount your own xdg-cache directory as a volume inside the container
docker run -v "${XDG_CACHE_HOME:-$HOME/.cache}":/root/.cache calpaterson/csvbase-client
```
Raw data
{
"_id": null,
"home_page": "https://github.com/calpaterson/csvbase-client",
"name": "csvbase-client",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "csv data processing",
"author": "Cal Paterson",
"author_email": "cal@calpaterson.com",
"download_url": "https://files.pythonhosted.org/packages/cb/89/da135b35c2fff39b40acc812bf2897376ce3b91510f43cf0ff6949fedcce/csvbase-client-0.1.1.tar.gz",
"platform": null,
"description": "<div align=\"center\">\n <img alt=\"csvbase logo\" src=\"https://github.com/calpaterson/csvbase/raw/main/csvbase/web/static/logo/128x128.png\">\n</div>\n\n# csvbase-client\n\nThe command line client and pandas integration for [csvbase](https://csvbase.com/).\n\n## Status\n\nSemantic versioning is followed, see the [changelog](https://github.com/calpaterson/csvbase-client/blob/main/CHANGELOG.md).\n\n## Usage\n\n### Get a table\n\nIn pandas:\n\n```python\n>>> import pandas as pd\n>>> pd.read_csv(\"csvbase://meripaterson/stock-exchanges\")\n>>> pd.read_csv(\"csvbase://meripaterson/stock-exchanges\")\n csvbase_row_id Continent Country Name MIC Last changed\n0 1 Africa Lesotho HYBSE NaN 2019-03-25\n1 2 Asia Kazakhstan Astana International Financial Centre AIXK 2018-11-18\n2 3 Africa South Africa ZAR X ZARX 2018-11-18\n3 4 South America Argentina Bolsas y Mercados Argentinos NaN 2018-04-02\n4 5 North America United States of America Delaware Board of Trade NaN 2018-04-02\n.. ... ... ... ... ... ...\n246 247 North America United States of America Long-Term Stock Exchange LTSE 2020-09-14\n247 248 North America United States of America Miami International Securities Exchange MIHI 2020-09-24\n248 249 North America United States of America Members' Exchange NaN 2020-09-24\n249 250 Africa Zimbabwe Victoria Falls Stock Exchange NaN 2020-11-01\n250 251 Asia China Beijing Stock Exchange NaN 2021-12-27\n\n[251 rows x 6 columns]\n```\n\nFrom the command line\n\n```bash\ncsvbase-client table get meripaterson/stock-exchanges\ncsvbase_row_id,Continent,Country,Name,MIC,Last changed\n1,Africa,Lesotho,HYBSE,,2019-03-25\n2,Asia,Kazakhstan,Astana International Financial Centre,AIXK,2018-11-18\n3,Africa,South Africa,ZAR X,ZARX,2018-11-18\n[ full file omitted ]\n```\n\n### Set (aka \"upsert\") a table:\n\n```bash\ncsvbase-client table set meripaterson/stock-exchanges stock-exchanges.csv\n```\n\nNothing is output upon success and exit code is 0.\n\n## Installing\n\n### Executable\n\nDownload these from the github [release page](https://github.com/calpaterson/csvbase-client/releases/).\n\n### Pip + PyPI\n\n```bash\npip install csvbase-client\n```\n\n### Docker\n\n```bash\ndocker pull calpaterson/csvbase-client\n```\n\nThen when you run:\n\n```bash\n# mount your own xdg-cache directory as a volume inside the container\ndocker run -v \"${XDG_CACHE_HOME:-$HOME/.cache}\":/root/.cache calpaterson/csvbase-client\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "The command line client for csvbase",
"version": "0.1.1",
"project_urls": {
"Bug Tracker": "https://github.com/calpaterson/csvbase-client/issues",
"Changelog": "https://github.com/calpaterson/csvbase-client/blob/main/CHANGELOG.md",
"Documentation": "https://github.com/calpaterson/csvbase-client/wiki",
"Homepage": "https://github.com/calpaterson/csvbase-client",
"Source Code": "https://github.com/calpaterson/csvbase-client"
},
"split_keywords": [
"csv",
"data",
"processing"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3432665ace40e2f7bf0b38322a192d2470d1cc5e4eff929e10f91d462388171f",
"md5": "26a748325c47076092ef4c92114b5d76",
"sha256": "4cabfdf01aa0a48189ce1411c68a364178b8172acb68cc3fc86f3b321f54ca76"
},
"downloads": -1,
"filename": "csvbase_client-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "26a748325c47076092ef4c92114b5d76",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 28091,
"upload_time": "2024-04-10T06:36:06",
"upload_time_iso_8601": "2024-04-10T06:36:06.678028Z",
"url": "https://files.pythonhosted.org/packages/34/32/665ace40e2f7bf0b38322a192d2470d1cc5e4eff929e10f91d462388171f/csvbase_client-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "cb89da135b35c2fff39b40acc812bf2897376ce3b91510f43cf0ff6949fedcce",
"md5": "15449437d08c7d9ce6feb621e2f35f9d",
"sha256": "c510b08c3a5e2657e26497d349047d3f1c96f89ee30f6e243779ab45e30e6a19"
},
"downloads": -1,
"filename": "csvbase-client-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "15449437d08c7d9ce6feb621e2f35f9d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 26779,
"upload_time": "2024-04-10T06:36:08",
"upload_time_iso_8601": "2024-04-10T06:36:08.557343Z",
"url": "https://files.pythonhosted.org/packages/cb/89/da135b35c2fff39b40acc812bf2897376ce3b91510f43cf0ff6949fedcce/csvbase-client-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-10 06:36:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "calpaterson",
"github_project": "csvbase-client",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "csvbase-client"
}