{ "info": { "author": "LasLabs Inc.", "author_email": "support@laslabs.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "|License MIT| | |PyPi Package| | |PyPi Versions|\n\n|Build Status| | |Test Coverage| | |Code Climate|\n\n=======================\nPython Cannabis Reports\n=======================\n\nThis library allows you to interact with the Cannabis Reports API using Python.\n\n* `Read The API Documentation `_\n\n.. contents:: Table of Contents\n\n============\nInstallation\n============\n\nInstallation is easiest using Pip and PyPi::\n\n pip install cannabis-reports\n\nIf you would like to contribute, or prefer Git::\n\n git clone https://github.com/LasLabs/python-cannabis-reports.git\n cd python-cannabis-reports\n pip install .\n\n=====\nUsage\n=====\n\nThe `CannabisReports object `_ is the primary point of\ninteraction with the CannabisReports API.\n\nConnection\n==========\n\nConnecting to the CannabisReports API will require an API Key, which is generated from\nwithin your CannabisReports account. In the below example, our key is ``API_KEY``.\n\n.. code-block:: python\n\n from cannabis-reports import CannabisReports\n cr = CannabisReports('API_KEY')\n\nAPI Endpoints\n=============\n\nThe CannabisReports API endpoints are exposed as variables on the instantiated \n``CannabisReports`` object. The available endpoints are:\n\n* `Dispensaries `_\n* `Edibles `_\n* `Extracts `_\n* `Flowers `_\n* `Producers `_\n* `Products `_\n* `Strains `_\n\nThey can also be viewed from the ``__apis__`` property of ``CannabisReports``::\n\n >>> cr.__apis__\n {'Strains': ,\n }\n\nAPI usage is as simple as calling the method with the required parameters and\niterating the results:\n\n.. code-block:: python\n\n for strain in cr.Strains.list():\n print(strain)\n print(strain.serialize())\n break\n\nThe output from the above would look something like the below:\n\n.. code-block:: python\n\n # This is the Strain object itself (first print)\n \n # This is the serialized form of the Strain (second print)\n {'name': '#1K',\n 'updated_at': {\n 'datetime': '2015-06-16 22:10:20',\n 'timezone': 'UTC'\n },\n 'lineage': [],\n 'qr': 'https://www.cannabisreports.com/strain-reports/unknown-breeder/1k/qr-code.svg',\n 'seed_company': {\n '__class__': 'SeedCompany',\n 'ucpc': '9XVU700000000000000000000',\n 'link': 'https://www.cannabisreports.com/api/v1.0/seed-companies/9XVU700000000000000000000'\n },\n 'genetics': {'__class__': 'StrainGenetics'},\n 'created_at': {'datetime': '2015-06-16 22:10:20', 'timezone': 'UTC'},\n 'reviews': {\n '__class__': 'GeneralOverview',\n 'link': 'https://www.cannabisreports.com/api/v1.0/strains/9XVU7PZUEC000000000000000/reviews'\n },\n 'image': 'https://www.cannabisreports.com/images/strains/no_image.png',\n 'ucpc': '9XVU7PZUEC000000000000000',\n '__class__': 'Strain',\n 'url': 'https://www.cannabisreports.com/strain-reports/unknown-breeder/1k',\n 'children': {\n '__class__': 'GeneralOverview',\n 'count': 2,\n 'link': 'https://www.cannabisreports.com/api/v1.0/strains/9XVU7PZUEC000000000000000/children'\n },\n 'link': 'https://www.cannabisreports.com/api/v1.0/strains/9XVU7PZUEC000000000000000'\n }\n\nIn some instances, such as in the case of browsing for a record by its UCPC, a\nsingleton is expected. In these instances, the singleton is directly used\ninstead of iterated\n\n.. code-block:: python\n\n >>> strain = cr.Strains.get('9XVU7PZUEC000000000000000')\n >>> strain\n \n >>> strain.serialize()\n {'name': '#1K',\n 'updated_at': {\n 'datetime': '2015-06-16 22:10:20',\n 'timezone': 'UTC'\n },\n 'lineage': [],\n 'qr': 'https://www.cannabisreports.com/strain-reports/unknown-breeder/1k/qr-code.svg',\n 'seed_company': {\n '__class__': 'SeedCompany',\n 'ucpc': '9XVU700000000000000000000',\n 'link': 'https://www.cannabisreports.com/api/v1.0/seed-companies/9XVU700000000000000000000'\n },\n 'genetics': {'__class__': 'StrainGenetics'},\n 'created_at': {'datetime': '2015-06-16 22:10:20', 'timezone': 'UTC'},\n 'reviews': {\n '__class__': 'GeneralOverview',\n 'link': 'https://www.cannabisreports.com/api/v1.0/strains/9XVU7PZUEC000000000000000/reviews'\n },\n 'image': 'https://www.cannabisreports.com/images/strains/no_image.png',\n 'ucpc': '9XVU7PZUEC000000000000000',\n '__class__': 'Strain',\n 'url': 'https://www.cannabisreports.com/strain-reports/unknown-breeder/1k',\n 'children': {\n '__class__': 'GeneralOverview',\n 'count': 2,\n 'link': 'https://www.cannabisreports.com/api/v1.0/strains/9XVU7PZUEC000000000000000/children'\n },\n 'link': 'https://www.cannabisreports.com/api/v1.0/strains/9XVU7PZUEC000000000000000'\n }\n\nNote that all of the API responses will be parsed, with proper objects being\ncreated from the results. The objects are all defined in the `cannabis-reports.models\npackage `_.\n\n\nKnown Issues / Road Map\n=======================\n\n- This ReadMe could use work\n- More testing on the endpoints. Kept getting rate limited and have not yet received\n and API key.\n\nCredits\n=======\n\nMost of the doc strings were taken directly from the `Cannabis\nReports API Documentation `_\n\nContributors\n------------\n\n* Dave Lasley \n\nMaintainer\n----------\n\n.. image:: https://laslabs.com/logo.png\n :alt: LasLabs Inc.\n :target: https://laslabs.com\n\nThis module is maintained by LasLabs Inc.\n\n.. |Build Status| image:: https://img.shields.io/travis/LasLabs/python-cannabis-reports/master.svg\n :target: https://travis-ci.org/LasLabs/python-cannabis-reports\n.. |Test Coverage| image:: https://img.shields.io/codecov/c/github/LasLabs/python-cannabis-reports/master.svg\n :target: https://codecov.io/gh/LasLabs/python-cannabis-reports\n.. |Code Climate| image:: https://codeclimate.com/github/LasLabs/python-cannabis-reports/badges/gpa.svg\n :target: https://codeclimate.com/github/LasLabs/python-cannabis-reports\n.. |License MIT| image:: https://img.shields.io/github/license/laslabs/python-cannabis-reports.svg\n :target: https://opensource.org/licenses/MIT\n :alt: License: MIT\n.. |PyPi Package| image:: https://img.shields.io/pypi/v/cannabis-reports.svg\n :target: https://pypi.python.org/pypi/cannabis-reports\n :alt: PyPi Package\n.. |PyPi Versions| image:: https://img.shields.io/pypi/pyversions/cannabis-reports.svg\n :target: https://pypi.python.org/pypi/cannabis-reports\n :alt: PyPi Versions", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/LasLabs/python-cannabis-reports", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://laslabs.github.io/python-cannabis-reports", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "cannabis-reports", "package_url": "https://pypi.org/project/cannabis-reports/", "platform": "", "project_url": "https://pypi.org/project/cannabis-reports/", "project_urls": { "Download": "https://github.com/LasLabs/python-cannabis-reports", "Homepage": "https://laslabs.github.io/python-cannabis-reports" }, "release_url": "https://pypi.org/project/cannabis-reports/0.1.1/", "requires_dist": null, "requires_python": "", "summary": "This library allows you to interact with Cannabis Reports using Python.", "version": "0.1.1" }, "last_serial": 3404201, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "ea7774f8c7e675587ee0d9418fb81d9f", "sha256": "edf3e4b2681b8c3c487992a7bf372ce1211cdbddaf7cbb16ca7583820c008692" }, "downloads": -1, "filename": "cannabis-reports-0.1.0.tar.gz", "has_sig": false, "md5_digest": "ea7774f8c7e675587ee0d9418fb81d9f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 48794, "upload_time": "2017-12-08T22:23:59", "url": "https://files.pythonhosted.org/packages/b3/0e/75c90a804783bd8f857fa71a08f35cd92b9251651e99b24de529417dd7f9/cannabis-reports-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "267d67aebd7445faa6b01fcc04f4391a", "sha256": "d15d1506f93b129ad5dcc591d8297ffd5a642226019aaca804385f1072ddf595" }, "downloads": -1, "filename": "cannabis-reports-0.1.1.tar.gz", "has_sig": false, "md5_digest": "267d67aebd7445faa6b01fcc04f4391a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 138742, "upload_time": "2017-12-09T22:05:14", "url": "https://files.pythonhosted.org/packages/ea/22/5366d6851532d2911437b3174469242944747150623d5e260484671950a8/cannabis-reports-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "267d67aebd7445faa6b01fcc04f4391a", "sha256": "d15d1506f93b129ad5dcc591d8297ffd5a642226019aaca804385f1072ddf595" }, "downloads": -1, "filename": "cannabis-reports-0.1.1.tar.gz", "has_sig": false, "md5_digest": "267d67aebd7445faa6b01fcc04f4391a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 138742, "upload_time": "2017-12-09T22:05:14", "url": "https://files.pythonhosted.org/packages/ea/22/5366d6851532d2911437b3174469242944747150623d5e260484671950a8/cannabis-reports-0.1.1.tar.gz" } ] }