{"id":50969087,"url":"https://github.com/cannlytics/cannlytics","last_synced_at":"2026-06-19T00:01:13.000Z","repository":{"id":38188396,"uuid":"304917105","full_name":"cannlytics/cannlytics","owner":"cannlytics","description":"🔥 Cannlytics = cannabis + analytics. Data pipelines, user interfaces, and the best statistics in the game. Made with ❤️","archived":false,"fork":false,"pushed_at":"2024-10-29T04:29:55.000Z","size":218901,"stargazers_count":69,"open_issues_count":66,"forks_count":16,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-10-13T00:25:28.759Z","etag":null,"topics":["cannabis","cannabis-api","cannabis-app","cannabis-data","cannabis-scripts","cannabis-strains","cannabis-variety","cannabisapp","data-mining","data-science","django","firebase","machine-learning","metrc","nlp","python","strain-data","terpene-profile","terpenes"],"latest_commit_sha":null,"homepage":"https://cannlytics.com","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cannlytics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-10-17T16:11:08.000Z","updated_at":"2025-10-11T05:15:52.000Z","dependencies_parsed_at":"2024-05-23T01:38:17.992Z","dependency_job_id":"9a645118-d21e-41d9-acbb-30e36c4e7838","html_url":"https://github.com/cannlytics/cannlytics","commit_stats":{"total_commits":619,"total_committers":6,"mean_commits":"103.16666666666667","dds":"0.017770597738287597","last_synced_commit":"ed17fdc79612698dc59c974709be22aa8a6faf0f"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/cannlytics/cannlytics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cannlytics%2Fcannlytics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cannlytics%2Fcannlytics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cannlytics%2Fcannlytics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cannlytics%2Fcannlytics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cannlytics","download_url":"https://codeload.github.com/cannlytics/cannlytics/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cannlytics%2Fcannlytics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34511617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cannabis","cannabis-api","cannabis-app","cannabis-data","cannabis-scripts","cannabis-strains","cannabis-variety","cannabisapp","data-mining","data-science","django","firebase","machine-learning","metrc","nlp","python","strain-data","terpene-profile","terpenes"],"created_at":"2026-06-19T00:01:12.195Z","updated_at":"2026-06-19T00:01:12.982Z","avatar_url":"https://github.com/cannlytics.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔥Cannlytics\n\n[Cannlytics](https://cannlytics.com) is a set of tools to wrangle, augment, archive, and analyze cannabis data. From seed to sale to the effects, Cannlytics can help you access, organize, analyze, and generally benefit from available cannabis data. You are welcome to use any and all of the tools that you find useful.\n\n## Installation \u003ca name=\"installation\"\u003e\u003c/a\u003e\n\nYou can install the `cannlytics` Python package from [PyPI](https://pypi.org/project/cannlytics/).\n\n```shell\npip install cannlytics\n```\n\nYou can clone the repository to get your hands on the Cannlytics source code.\n\n```shell\ngit clone https://github.com/cannlytics/cannlytics.git\n```\n\n## Data \u003ca name=\"data\"\u003e\u003c/a\u003e\n\nThe `cannlytics.data` module is a toolbox for accessing, collecting, cleaning, augmenting, standardizing, saving, and analyzing cannabis data. See [the `cannlytics.data` documentation](./data/readme.md) for nifty tools to get, standardize, and archive your cannabis data.\n\n### COAs \u003ca name=\"coas\"\u003e\u003c/a\u003e\n\nCertificates of analysis (COAs) are abundant for cultivators, processors, retailers, and consumers too, but the data is often locked away. Rich, valuable laboratory data so close, yet so far away! `CoADoc` puts these vital data points in your hands by parsing PDFs and URLs, finding **all the data**, standardizing the data, and cleanly returning the data to you. You can read more about using CoADoc in [the `cannlytics.data.coas` documentation](./data/coas/readme.md).\n\n## Metrc \u003ca name=\"metrc\"\u003e\u003c/a\u003e\n\nYou can use the `cannlytics.metrc` module to securely interface with the Metrc API and perform all operations needed for compliance. Simply plug in your vendor and user API keys, specify your state of operations, and you're off to the races.\n\n```py\nfrom cannlytics import metrc\n\n# Initialize a Metrc API client.\ntrack = metrc.authorize(\n    'your-vendor-api-key',\n    'your-user-api-key',\n    primary_license='your-user-license-number',\n    state='ok',\n)\n```\n\nProducer / processor workflow:\n\n```py\n# Get a plant by it's ID.\nplant = track.get_plants(uid='123')\n\n# Change the growth phase from vegetative to flowering.\nplant.flower(tag='your-plant-tag')\n\n# Move the flowering plant to a new room.\nplant.move(location_name='The Flower Room')\n\n# Manicure useable cannabis from the flowering plant.\nplant.manicure(harvest_name='Old-Time Moonshine', weight=4.20)\n\n# Harvest the flowering plant.\nplant.harvest(harvest_name='Old-Time Moonshine', weight=420)\n```\n\nLab workflow:\n\n```py\n# Post lab results.\ntrack.post_lab_results([{...}, {...}])\n\n# Get a tested package.\ntest_package = track.get_packages(label='abc')\n\n# Get the tested package's lab result.\nlab_results = track.get_lab_results(uid=test_package.id)\n```\n\nRetail workflow:\n\n```py\n# Get a retail package.\npackage = track.get_packages(label='abc')\n\n# Create a sales receipts.\ntrack.create_receipts([{...}, {...}])\n\n# Get recent receipts.\nsales = track.get_receipts(action='active', start='2021-04-20')\n\n# Update the sales receipt.\nsale = track.get_receipts(uid='420')\nsale.total_price = 25\nsale.update()\n```\n\nSee [the `cannlytics.metrc` documentation](./cannlytics/metrc/readme.md) for more information and examples on how you can interface with the Metrc API.\n\n\n## License\n\n```\nCopyright (c) 2020-2025 Cannlytics\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcannlytics%2Fcannlytics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcannlytics%2Fcannlytics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcannlytics%2Fcannlytics/lists"}