{ "info": { "author": "BlackCurve LTD.", "author_email": "george.rowberry@blackcurve.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "\n# BlackCurve Python API Library \nBlackCurve\n\n## API Documentation \nDocumentation for the BlackCurve endpoints can be found [here](https://blackcurve.io/api/docs). \n\n## Requirements \n* Python 2.7+\n* [Requests](http://docs.python-requests.org/en/master/) HTTP library for python v2.0 or above. \n\n## Installation\n> `$ pip install blackcurve`\n\n## Basic Usage\n### Initiate a Connection\nYou just need your subdomain and a access token to get started\n ```python\n\tfrom blackcurve.api import BlackCurveAPI\t\n\tbc = BlackCurveAPI({{ subdomain }}, {{ access_token }})\t\n```\n### Reload a Access Token\nNeed a new access token, or just misplaced the old one?\n ```python\n\tbc = BlackCurveAPI({{ subdomain }})\n\ttoken = bc.get_access_token({{ client_key }}, {{ client_secret }})\n\tprint(token)\t\n```\nThis will also update your BlackCurveAPI instance with the new token so you can immediately carry on with requests.\n\n### Get Prices\nGet a list of current Prices\n ```python\n\t# get all the prices\n\tbc.prices().all()\n\n\t# get all prices\n\tprices = bc.prices().all()\n\tprint('You have {} prices'.format(len(prices)))\n\n\t# get a price for a single product by Product ID\n\tbc.prices().find('UK42')\n\n\t# filter specific product columns\n\tbc.prices(columns=['Price', 'Product ID']).all()\n\n\t# filter geography\n\tbc.prices(geography='UK').all()\n\n\t# filter by column value -- price >= 5\n\tbc.prices(price_gte=5).all()\n\n```\n\n### Data Sources Info\nGet column and data type information about your data sources\n ```python\n\t# get all the data sources\n\tdata_sources = bc.data_sources_info().all()\n\tprint(data_sources)\n\n\t# get a single data source\n\tsales_history = bc.data_sources_info().find('Sales History')\n\tprint(sales_history)\n\n\t# create a new column \n\tsales_history['New Order Column'] = 'Integer'\n\tsales_history.save()\n\n\t# delete a column\n\tdel sales_history['New Order Column']\n\tsales_history.save()\n\n```\n### Data Sources\nGet a list of all of the data in a given source\n ```python\n\t# get all of the data from sales history\n\tbc.data_sources('Sales History').all()\n\n\t# get just the volume and product id columns in sales history\n\tbc.data_sources('Sales History', columns=['Volume', 'Product ID']).all()\n\n\t# filter by column value -- price >= 5\n\tbc.data_sources('Sales History', price_gte=5).all()\n\n\t# get a generator for all the pages returned in sales history (lazy requests)\n\tsales_history = bc.data_sources('Sales History').all()\n\tpage = 1\n\tfor x in sales_history:\n\t\tprint('Page %s of Sales History: %s' % (page, x))\n\t\tpage += 1\n\n\t# get a Transactions system id\n\tsales_history = bc.data_sources('Sales History').all()\n\tfirst_sale = sales_history[0]\n\tfirst_sale_id = first_sale.id\n\n\t# find a transaction by a system id\n\tfirst_sale = bc.data_sources('Sales History').find(first_sale_id)\n\n\t# edit a column on a transaction\n\tfirst_sale['Price'] = 42.00\n\tfirst_sale.save()\n\n\t# create a new transaction\n\tsales_history = bc.data_sources('Sales History')\n sales_history.create({\n 'Product ID': 'UK54321',\n 'Profit': 7.77,\n 'Revenue': 6.66,\n 'Volume': 1,\n 'Price': 3.33,\n 'Transaction Date': datetime.date.today()\n })\n\n\t# get all transactions for a given product id\n\ttransactions = bc.data_sources('Sales History', product_id='UK54321').all()\n\tprint('There are {} transactions for product - UK54321'.format(len(transactions)))\n\n\t# change the price of a product [must use the kwarg product_id as .find() is only for system id] \n\tproduct = bc.data_sources('Product Inventory', product_id='UK54321').all()[0]\n\tproduct['Price'] = 55.99\n\tproduct.save()\n\n```\n\n### Geographies & Currencies\nGet a list of associated data for Geographies and Currencies\n```python\n # get a list of all of the geography data\n all_geographies = bc.geographies().all()\n\n # get a specific geography\n website_uk = bc.geographies('Website UK').all()\n\n # get a list of all currencies\n all_currencies = bc.currencies().all()\n\n```\n\n\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/blackcurve/BlackCurve-API", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "blackcurve", "package_url": "https://pypi.org/project/blackcurve/", "platform": "", "project_url": "https://pypi.org/project/blackcurve/", "project_urls": { "Homepage": "https://github.com/blackcurve/BlackCurve-API" }, "release_url": "https://pypi.org/project/blackcurve/0.3.1/", "requires_dist": [ "requests" ], "requires_python": "", "summary": "An easy to use python interface for BlackCurve's API", "version": "0.3.1" }, "last_serial": 5381070, "releases": { "0.1.5": [ { "comment_text": "", "digests": { "md5": "79f2762aafe1eb46267e2aa2fc552a90", "sha256": "12de5443b63c8105845fb917497bfde0271152fec6a5e6323df9ec3a3cf2ba05" }, "downloads": -1, "filename": "blackcurve-0.1.5-py3-none-any.whl", "has_sig": false, "md5_digest": "79f2762aafe1eb46267e2aa2fc552a90", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13531, "upload_time": "2019-04-16T13:31:42", "url": "https://files.pythonhosted.org/packages/04/9b/cd2224116bb97c441ccadc0b2994506f1c4734df180a9852fcdfc7bbd2e2/blackcurve-0.1.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4f5fd5beac6deb6f1b262db43c0bcd0f", "sha256": "10f408ccd76ad0682eec3ca76ec3444378b530c929e2e083b7b02eab5bc20fdd" }, "downloads": -1, "filename": "blackcurve-0.1.5.tar.gz", "has_sig": false, "md5_digest": "4f5fd5beac6deb6f1b262db43c0bcd0f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7207, "upload_time": "2019-04-16T13:31:48", "url": "https://files.pythonhosted.org/packages/42/a5/b8f615cb979734dd4e35a21b6c89fda5c9c63dadbf8c20e4eb5bcfa3b6c2/blackcurve-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "d70e3cbdeb72db0e9d7670ae7b99a60a", "sha256": "9c95cebcd25a56c5ea187273e6aa9186a5292b32178ac9db722c89050c695d46" }, "downloads": -1, "filename": "blackcurve-0.1.6-py3-none-any.whl", "has_sig": false, "md5_digest": "d70e3cbdeb72db0e9d7670ae7b99a60a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13932, "upload_time": "2019-04-16T13:31:43", "url": "https://files.pythonhosted.org/packages/2d/08/eaea4ec03ab5c2c6dab1fa7c5ff37360de62a965b8a3f1937be4d00afc68/blackcurve-0.1.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "df58c1a0e3fe3b8cc558db529c2cf731", "sha256": "e609851465e4ffb3cf190c74bd0ecf85d446092f7f5ba6692a6e3006064b8da8" }, "downloads": -1, "filename": "blackcurve-0.1.6.tar.gz", "has_sig": false, "md5_digest": "df58c1a0e3fe3b8cc558db529c2cf731", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8112, "upload_time": "2019-04-16T13:31:50", "url": "https://files.pythonhosted.org/packages/0d/e9/a123e640a6969ae09f632a6c4c8a3a3e862572ea86b6f6f55b2394bd8c86/blackcurve-0.1.6.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "6999c1f39feb30836c2381467d67954e", "sha256": "97afe61ee49eca080cfc3e4cc18a765dffadf9b2d0c4f92abcf46f02500c2f3c" }, "downloads": -1, "filename": "blackcurve-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "6999c1f39feb30836c2381467d67954e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13929, "upload_time": "2019-04-16T13:31:45", "url": "https://files.pythonhosted.org/packages/85/a2/c194abc07824b978a0fbfcc0da66a75aec38358455d6d834b2283984b776/blackcurve-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "aa4f88800bfc775f0385eda24b91dad8", "sha256": "f068517e98411759e41c84bb634f46bcc6b7f9ebc78367310aa3bf6d4e38d9ac" }, "downloads": -1, "filename": "blackcurve-0.2.0.tar.gz", "has_sig": false, "md5_digest": "aa4f88800bfc775f0385eda24b91dad8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8115, "upload_time": "2019-04-16T13:31:51", "url": "https://files.pythonhosted.org/packages/94/ba/c9225742dd58dac8e5cfaf373c7c5d3203f4b9288537131b64453033f888/blackcurve-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "09e63186b35a4de776747468cd77287d", "sha256": "e644018706cc03f6da8ebaf1f6887576ca695d3a4ca0ab9594f2084daff4d525" }, "downloads": -1, "filename": "blackcurve-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "09e63186b35a4de776747468cd77287d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14653, "upload_time": "2019-04-16T13:31:47", "url": "https://files.pythonhosted.org/packages/67/3c/301fb9221e891bd66a4a382071551c373f47eddf7a09b04a6e6736179a20/blackcurve-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6d26bce95fecab87fba06ecd173610eb", "sha256": "fa507b557c2f7cc155a6f224ce767e93ef3a7a5714f9700954f914e9d3b044f9" }, "downloads": -1, "filename": "blackcurve-0.2.1.tar.gz", "has_sig": false, "md5_digest": "6d26bce95fecab87fba06ecd173610eb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9960, "upload_time": "2019-04-16T13:31:52", "url": "https://files.pythonhosted.org/packages/57/41/3f11e629e5aa788fc95a2dd533459e1f3bb79d9690d9f7f166bfc7ff7944/blackcurve-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "588146c870dbe3697fb83e5c9703637f", "sha256": "29059756882c7aeeb9b58f699c32464cab00debbb8d05d51d26492b7e5bf847a" }, "downloads": -1, "filename": "blackcurve-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "588146c870dbe3697fb83e5c9703637f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14661, "upload_time": "2019-04-24T14:16:34", "url": "https://files.pythonhosted.org/packages/60/1f/b3f632585c5210f36c19202475850b285621c1a62b5eca7024e7fa8e4d3f/blackcurve-0.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "99d09e1174de47021dd0c4ea869d16ab", "sha256": "959f5328776eb576d7fa4bdda533da4b6fb7aeae190925c4c338e01f97cbdc7b" }, "downloads": -1, "filename": "blackcurve-0.2.2.tar.gz", "has_sig": false, "md5_digest": "99d09e1174de47021dd0c4ea869d16ab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9968, "upload_time": "2019-04-24T14:16:35", "url": "https://files.pythonhosted.org/packages/62/46/72a07ebeb3fd4e44ab28da87818631ffeb11c382b8c383d635cbced0ec63/blackcurve-0.2.2.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "ab7828ac3cdd033342d1385bef0d42a6", "sha256": "2d8b16062c75a20a30f3dc1efa50337a2574d24d6f36c0d74773bc3826cbbcc6" }, "downloads": -1, "filename": "blackcurve-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ab7828ac3cdd033342d1385bef0d42a6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14766, "upload_time": "2019-06-03T15:16:28", "url": "https://files.pythonhosted.org/packages/8c/7d/46c5614a14ffb7eae01762d047fbc4151511478cae9c8e2dac629d2202a2/blackcurve-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "45dd97ddf3afcd2b9064118d0eff7f93", "sha256": "ebcb440e4e861e5730943c95cf1675356887be0248cb15def4bba7ad584f94fd" }, "downloads": -1, "filename": "blackcurve-0.3.0.tar.gz", "has_sig": false, "md5_digest": "45dd97ddf3afcd2b9064118d0eff7f93", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10065, "upload_time": "2019-06-03T15:16:34", "url": "https://files.pythonhosted.org/packages/87/ef/93c8394bfa69688fdbff01a592c0d3acb4cd1381eea08e7c90a51286dc87/blackcurve-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "2fe4118b1ca9dcdc9da322264fe17288", "sha256": "1b65dd912cf7f16136abfbd3e211dc9081fff05d3b89c56cdda7c3d9546c4866" }, "downloads": -1, "filename": "blackcurve-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "2fe4118b1ca9dcdc9da322264fe17288", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9616, "upload_time": "2019-06-10T13:42:26", "url": "https://files.pythonhosted.org/packages/83/14/a9a30426d76de76547b80514b711c8e553c4d50eb333a5e0b934beccb136/blackcurve-0.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f3b22ed1ffbf41440bc0c300c2998947", "sha256": "473c6162b6125b7c0c907e57e6c0c9775ef5c26475a08eb7734f092141dbd94c" }, "downloads": -1, "filename": "blackcurve-0.3.1.tar.gz", "has_sig": false, "md5_digest": "f3b22ed1ffbf41440bc0c300c2998947", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8598, "upload_time": "2019-06-10T13:42:27", "url": "https://files.pythonhosted.org/packages/c5/12/14c35ad1ac5b0cfe551f3b66abe39cfbbaf621b0fd8ae2bcf994198c5996/blackcurve-0.3.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2fe4118b1ca9dcdc9da322264fe17288", "sha256": "1b65dd912cf7f16136abfbd3e211dc9081fff05d3b89c56cdda7c3d9546c4866" }, "downloads": -1, "filename": "blackcurve-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "2fe4118b1ca9dcdc9da322264fe17288", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9616, "upload_time": "2019-06-10T13:42:26", "url": "https://files.pythonhosted.org/packages/83/14/a9a30426d76de76547b80514b711c8e553c4d50eb333a5e0b934beccb136/blackcurve-0.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f3b22ed1ffbf41440bc0c300c2998947", "sha256": "473c6162b6125b7c0c907e57e6c0c9775ef5c26475a08eb7734f092141dbd94c" }, "downloads": -1, "filename": "blackcurve-0.3.1.tar.gz", "has_sig": false, "md5_digest": "f3b22ed1ffbf41440bc0c300c2998947", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8598, "upload_time": "2019-06-10T13:42:27", "url": "https://files.pythonhosted.org/packages/c5/12/14c35ad1ac5b0cfe551f3b66abe39cfbbaf621b0fd8ae2bcf994198c5996/blackcurve-0.3.1.tar.gz" } ] }