Skip to main content

🔥 Cannlytics is simple, easy-to-use, end-to-end cannabis analytics software designed to make your data and information accessible.

Project description

Simple, easy, cannabis analytics.

https://cannlytics.com

License: MIT Version

🔥 Cannlytics is simple, easy-to-use, end-to-end cannabis analytics software designed to make your data and information accessible. We believe that everyone in the cannabis industry should be able to access their rich, valuable data quickly and easily and that everyone will be better off for it. The Cannlytics Engine comes with batteries included, but you are always welcome to supercharge your setup with modifications and custom components.

🚀 Installation

You can install the Cannlytics engine from PyPI.

pip install cannlytics

You can also simply clone the repository to get your hands on the Cannlytics source code.

git clone https://github.com/cannlytics/cannlytics-engine.git

👩‍🏫 Documentation

Please refer to the Cannlytics developer documentation for detailed information about the module and various use cases.

🗝️ Authentication, Data, and File Management

Cannlytics leverages Firebase by default for a database, file storage, and authentication. You can refer to the documentation for instructions on how to setup your Firebase project for use with Cannlytics.

🧐 Traceability

Cannlytics supports Metrc out-of-the-box. Simply plug in your API keys and you're off to the races.

from cannlytics import metrc

# Initialize a Metrc API client.
track = metrc.authorize(
    'your-vendor-api-key',
    'your-user-api-key',
    primary_license='your-user-license-number',
    state='ma',
)

Producer / processor workflow:

# Get a plant by it's ID.
plant = track.get_plants(uid='123')

# Change the growth phase from vegetative to flowering.
plant.flower(tag='your-plant-tag')

# Move the flowering plant to a new room.
plant.move(location_name='The Flower Room')

# Manicure useable cannabis from the flowering plant.
plant.manicure(harvest_name='Old-Time Moonshine', weight=4.20)

# Harvest the flowering plant.
plant.harvest(harvest_name='Old-Time Moonshine', weight=420)

Lab workflow:

# Post lab results.
track.post_lab_results([{...}, {...}])

# Get a tested package.
test_package = track.get_packages(label='abc')

# Get the tested package's lab result.
lab_results = track.get_lab_results(uid=test_package.id)

Retail workflow:

# Get a retail package.
package = track.get_packages(label='abc')

# Create a sales receipts.
track.create_receipts([{...}, {...}])

# Get recent receipts.
sales = track.get_receipts(action='active', start='2021-04-20')

# Update the sales receipt using.
sale = track.get_receipts(uid='420')
sale.total_price = 25
sale.update()

👩‍🔬 Testing

You can run tests with code coverage with pytest.

pytest --cov=cannlytics tests/

🤝 Contributing

Contributions are always welcome! You are encouraged to submit issues, functionality, and features that you want to be addressed. You can also develop your own new features, fix known issues, and add documentation, tests, and examples. Anyone is welcome to contribute anything. Please see the contributing guide for more information.

❤️ Support

Cannlytics is made available with ❤️ and your good will. Please consider making a contribution to keep the good work coming. Thank you 🙏

🥞 Bitcoin donation address: 34CoUcAFprRnLnDTHt6FKMjZyvKvQHb6c6

🏛️ License

Copyright (c) 2021-2022 Cannlytics

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cannlytics-0.0.9.tar.gz (84.0 kB view details)

Uploaded Source

Built Distribution

cannlytics-0.0.9-py3-none-any.whl (108.4 kB view details)

Uploaded Python 3

File details

Details for the file cannlytics-0.0.9.tar.gz.

File metadata

  • Download URL: cannlytics-0.0.9.tar.gz
  • Upload date:
  • Size: 84.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for cannlytics-0.0.9.tar.gz
Algorithm Hash digest
SHA256 e49b9b67e541ff44522812a762680262aa493797bb300da27f55a95c47d43e2f
MD5 23d65840040e6b04ee6323264ba37001
BLAKE2b-256 84c611180ccbc40c0fbc3138c573e420a962174a30d5fe93aa43639246ae7acd

See more details on using hashes here.

File details

Details for the file cannlytics-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: cannlytics-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 108.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for cannlytics-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 8164e6e382d23d90445057c4c935cc31b579155d93dcd90b31156c6408895d63
MD5 c8f2269df5ba9c3c762530b018e8b361
BLAKE2b-256 83526b13a7ee6f6eb5a2e46d50c17b811133e86c291671e4ed141ce4dc12a021

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page