Package: cannlytics
Cannabis data science and analytics.https://cannlytics.com🔥Cannlytics is a set of useful tools to wrangle, curate, augment, analyze, archive, and market cannabis data. The mission of Cannlytics is to help cannabis data and analytics be accessible. From seed to sale and beyond, Cannlytics can help you organize, analyze, and profit from your cannabis data. Thecannlyticspackage is extensive and you are welcome to use any and all of the components that you find useful.🚀 Installation🗝️ Authentication📡 Data📜 COAs🪙 Market🔥 Firebase⚗️ LIMS🛡️ Metrc📈 Statistics🚀 InstallationYou can install the Cannlytics engine fromPyPI.pipinstallcannlyticsYou can also simply clone the repository to get your hands on the Cannlytics source code.gitclonehttps://github.com/cannlytics/cannlytics.gitYou can get the nightly development build by cloning theapp-devbranch of the repository. Theapp-devbranch is not stable for production, but has the latest and greatest tools that we're working tirelessly to deliver to you shortly.gitclone-bapp-devhttps://github.com/cannlytics/cannlytics.git🗝️ AuthenticationCannlytics leverages🔥Firebasefor data storage, file storage, and authentication. Use of Firebase is entirely optional and you are welcome to use your favorite database and backend services. If you choose to use Firebase, then you will need to provide credentials for your application. This is typically done by setting aGOOGLE_APPLICATION_CREDENTIALSenvironment variable that points to your service account credentials. For more information on adding authentication to your app, seethecannlytics.firebasedocumentation.📡 DataThecannlytics.datamodule is a toolbox for accessing, collecting, cleaning, augmenting, standardizing, saving, and analyzing cannabis data. Seethecannlytics.datadocumentationfor nifty tools to get, standardize, and archive your cannabis data.📜 COAsCertificates 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!CoADocputs these vital data points in your hands by parsing PDFs and URLs, findingall the data, standardizing the data, and cleanly returning the data to you. You can read more about using CoADoc inthecannlytics.data.coasdocumentation.🔥 FirebaseThecannlytics.firebasemodule is a wrapper of thefirebase_adminpackage to make interacting with Firebase services, such as Firestore databases and Firebase Storage buckets, even easier. For more information, seethecannlytics.firebasedocumentation.🔰 MetrcCannlytics integrates withMetrc. You can use thecannlytics.metrcmodule 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.fromcannlyticsimportmetrc# Initialize a Metrc API client.track=metrc.authorize('your-vendor-api-key','your-user-api-key',primary_license='your-user-license-number',state='ok',)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.sale=track.get_receipts(uid='420')sale.total_price=25sale.update()Seethecannlytics.metrcdocumentationfor more information and examples on how you can interface with the Metrc API.