cannabis_reports.apis package¶
Submodules¶
cannabis_reports.apis.abstract_entity_endpoint module¶
- 
class 
cannabis_reports.apis.abstract_entity_endpoint.AbstractEntityEndpoint[source]¶ Bases:
cannabis_reports.base_api.BaseApiThis represents an abstract entity endpoint.
The Dispensaries and Producers API inherit from this.
- 
classmethod 
get_available(session, ucpc, lat, lng, radius=10, path_prefix=None, limit=None)[source]¶ Get information about the availability of everything from a producer using latitude and longitude.
Parameters: - session (requests.sessions.Session) – Authenticated session.
 - ucpc (str) – UCPC for the cannabis object you want the children from.
 - lat (float) – Latitude for the center of your availability search.
 - lng (float) – Longitude for the center of your availability search.
 - radius (int) – Radius to search for in miles, max 25.
 - path_prefix (str, optional) – A URI path to prefix with, which is useful for dispensary hierarchies. This will override the endpoint prefix, so it should include it if necessary.
 - limit (int, optional) – Stop after iterating this many pages.
 
Returns: An iterator of child objects.
Return type: RequestPaginator(output_type=cls.__object__)
- 
classmethod 
get_edibles(session, ucpc, path_prefix=None, limit=None)[source]¶ Gets a paginated list of edibles for a producer with the given UCPC.
Parameters: - session (requests.sessions.Session) – Authenticated session.
 - ucpc (str) – 
UCPC for the cannabis producer you want the edibles for.
 - path_prefix (str, optional) – A URI path to prefix with, which is useful for dispensary hierarchies. This will override the endpoint prefix, so it should include it if necessary.
 - limit (int, optional) – Stop after iterating this many pages.
 
Returns: The edibles for this producer.
Return type: RequestPaginator(output_type=Edible)
- 
classmethod 
get_extracts(session, ucpc, path_prefix=None, limit=None)[source]¶ Gets a paginated list of extracts for a producer with the given UCPC.
Parameters: - session (requests.sessions.Session) – Authenticated session.
 - ucpc (str) – 
UCPC for the cannabis producer you want the extracts for.
 - path_prefix (str, optional) – A URI path to prefix with, which is useful for dispensary hierarchies. This will override the endpoint prefix, so it should include it if necessary.
 - limit (int, optional) – Stop after iterating this many pages.
 
Returns: The extracts for this producer.
Return type: RequestPaginator(output_type=Extract)
- 
classmethod 
get_products(session, ucpc, path_prefix=None, limit=None)[source]¶ Gets a paginated list of products for a producer with the given UCPC.
Parameters: - session (requests.sessions.Session) – Authenticated session.
 - ucpc (str) – 
UCPC for the cannabis producer you want the products for.
 - path_prefix (str, optional) – A URI path to prefix with, which is useful for dispensary hierarchies. This will override the endpoint prefix, so it should include it if necessary.
 - limit (int, optional) – Stop after iterating this many pages.
 
Returns: The products for this producer.
Return type: RequestPaginator(output_type=Product)
- 
classmethod 
 
cannabis_reports.apis.abstract_item_endpoint module¶
- 
class 
cannabis_reports.apis.abstract_item_endpoint.AbstractItemEndpoint[source]¶ Bases:
cannabis_reports.base_api.BaseApiThis represents an abstract item endpoint.
The Strains API and AbstractProductEndpoint inherit from this.
- 
classmethod 
get_available(session, ucpc, lat, lng, radius=10, limit=None)[source]¶ Get information about the availability of the given UCPC.
Parameters: - session (requests.sessions.Session) – Authenticated session.
 - ucpc (str) – 
UCPC for the cannabis object you want the children from.
 - lat (float) – Latitude for the center of your availability search.
 - lng (float) – Longitude for the center of your availability search.
 - radius (int) – Radius to search for in miles, max 25.
 - limit (int, optional) – Stop after iterating this many pages.
 
Returns: An iterator of child objects.
Return type: RequestPaginator(output_type=cls.__object__)
- 
classmethod 
get_effects_flavors(session, ucpc)[source]¶ Get the average effects and flavors from reviews for this object.
Parameters: Returns: - The effect and flavor
 profile for this object.
Return type: 
- 
classmethod 
get_reviews(session, ucpc, limit=None)[source]¶ Get the reviews for a cannabis object.
Parameters: Returns: Reviews iterator.
Return type: RequestPaginator(output_type=cannabis_reports.models.Review)
- 
classmethod 
get_user(session, ucpc)[source]¶ Get the user who added the object to the database.
Parameters: Returns: - The user who added the object
 to the database.
Return type: 
- 
classmethod 
search(session, query, sort='created_at', path='type', limit=None)[source]¶ Return search results for objects.
Parameters: - session (requests.sessions.Session) – Authenticated session.
 - query (str) – Search query to find objects in our system. Must be at least 2 characters.
 - sort (str) – Snake cased field name to sort on. Prefix with a - for descending.
 - path (str) – The path for the search (eg for 
strainsit issearchand forflowersit istype. - limit (int, optional) – Stop after iterating this many pages.
 
Returns: Objects iterator.
Return type: RequestPaginator(output_type=cls.__object__)
- 
classmethod 
 
cannabis_reports.apis.abstract_product_endpoint module¶
- 
class 
cannabis_reports.apis.abstract_product_endpoint.AbstractProductEndpoint[source]¶ Bases:
cannabis_reports.apis.abstract_item_endpoint.AbstractItemEndpointThis represents an abstract product endpoint.
The Edibles, Extracts, Flowers, Products APIs inherit from this.
- 
classmethod 
get_producer(session, ucpc)[source]¶ Gets the producer for a given product.
Parameters: Returns: - The producer that was
 responsible for this product.
Return type: 
- 
classmethod 
 
cannabis_reports.apis.dispensaries module¶
- 
class 
cannabis_reports.apis.dispensaries.Dispensaries[source]¶ Bases:
cannabis_reports.apis.abstract_entity_endpoint.AbstractEntityEndpointThis represents the
DispensariesEndpoint.https://developers.cannabisreports.com/docs/dispensaries
- 
classmethod 
get_strains(session, slug, limit=None)[source]¶ Gets a paginated list of strains for a dispensary with the given slug.
Parameters: Returns: The strains for this dispensary.
Return type: RequestPaginator(output_type=Strain)
- 
classmethod 
 
cannabis_reports.apis.edibles module¶
- 
class 
cannabis_reports.apis.edibles.Edibles[source]¶ Bases:
cannabis_reports.apis.abstract_product_endpoint.AbstractProductEndpointThis represents the
EdiblesEndpoint.
cannabis_reports.apis.extracts module¶
- 
class 
cannabis_reports.apis.extracts.Extracts[source]¶ Bases:
cannabis_reports.apis.abstract_product_endpoint.AbstractProductEndpointThis represents the
ExtractsEndpoint.
cannabis_reports.apis.flowers module¶
- 
class 
cannabis_reports.apis.flowers.Flowers[source]¶ Bases:
cannabis_reports.apis.abstract_product_endpoint.AbstractProductEndpointThis represents the
FlowersEndpoint.
cannabis_reports.apis.producers module¶
- 
class 
cannabis_reports.apis.producers.Producers[source]¶ Bases:
cannabis_reports.apis.abstract_entity_endpoint.AbstractEntityEndpointThis represents the
ProducersEndpoint.
cannabis_reports.apis.products module¶
- 
class 
cannabis_reports.apis.products.Products[source]¶ Bases:
cannabis_reports.apis.abstract_product_endpoint.AbstractProductEndpointThis represents the
ProductsEndpoint.
cannabis_reports.apis.strains module¶
- 
class 
cannabis_reports.apis.strains.Strains[source]¶ Bases:
cannabis_reports.apis.abstract_item_endpoint.AbstractItemEndpointThis represents the
StrainsEndpoint.https://developers.cannabisreports.com/docs/strains
- 
classmethod 
get_children(session, ucpc, limit=None)[source]¶ Get the child strains that this one has been bred into.
Parameters: Returns: An iterator of child strains.
Return type: RequestPaginator(output_type=cannabis_reports.models.Strain)
- 
classmethod 
get_genetics(session, ucpc)[source]¶ Gets the strains that were the parent material for the strain with the given UCPC.
Parameters: Returns: An iterator of parent strains.
Return type: RequestPaginator(output_type=cannabis_reports.models.Strain)
- 
classmethod 
get_seed_company(session, ucpc)[source]¶ Get the seed company that was responsible for a cannabis strain.
Parameters: Returns: - The seed company that was
 responsible for this strain.
Return type: 
- 
classmethod 
search(session, query, sort='name', path='search', limit=None)[source]¶ Gets products for a given strain with optional sorting.
Parameters: - session (requests.sessions.Session) – Authenticated session.
 - query (str) – The search query.
 - sort (str) – Snake cased field name to sort on. Prefix with a - for descending.
 - path (str) – The path for the search (eg for 
strainsit issearchand forextractsit istype. - limit (int, optional) – Stop after iterating this many pages.
 
Returns: An iterator of parent extracts.
Return type: RequestPaginator(output_type=cannabis_reports.models.Extract)
- 
classmethod 
 
Module contents¶
- 
class 
cannabis_reports.apis.Dispensaries[source]¶ Bases:
cannabis_reports.apis.abstract_entity_endpoint.AbstractEntityEndpointThis represents the
DispensariesEndpoint.https://developers.cannabisreports.com/docs/dispensaries
- 
classmethod 
get_strains(session, slug, limit=None)[source]¶ Gets a paginated list of strains for a dispensary with the given slug.
Parameters: Returns: The strains for this dispensary.
Return type: RequestPaginator(output_type=Strain)
- 
classmethod 
 
- 
class 
cannabis_reports.apis.Edibles[source]¶ Bases:
cannabis_reports.apis.abstract_product_endpoint.AbstractProductEndpointThis represents the
EdiblesEndpoint.
- 
class 
cannabis_reports.apis.Extracts[source]¶ Bases:
cannabis_reports.apis.abstract_product_endpoint.AbstractProductEndpointThis represents the
ExtractsEndpoint.
- 
class 
cannabis_reports.apis.Flowers[source]¶ Bases:
cannabis_reports.apis.abstract_product_endpoint.AbstractProductEndpointThis represents the
FlowersEndpoint.
- 
class 
cannabis_reports.apis.Producers[source]¶ Bases:
cannabis_reports.apis.abstract_entity_endpoint.AbstractEntityEndpointThis represents the
ProducersEndpoint.
- 
class 
cannabis_reports.apis.Products[source]¶ Bases:
cannabis_reports.apis.abstract_product_endpoint.AbstractProductEndpointThis represents the
ProductsEndpoint.
- 
class 
cannabis_reports.apis.Strains[source]¶ Bases:
cannabis_reports.apis.abstract_item_endpoint.AbstractItemEndpointThis represents the
StrainsEndpoint.https://developers.cannabisreports.com/docs/strains
- 
classmethod 
get_children(session, ucpc, limit=None)[source]¶ Get the child strains that this one has been bred into.
Parameters: Returns: An iterator of child strains.
Return type: RequestPaginator(output_type=cannabis_reports.models.Strain)
- 
classmethod 
get_genetics(session, ucpc)[source]¶ Gets the strains that were the parent material for the strain with the given UCPC.
Parameters: Returns: An iterator of parent strains.
Return type: RequestPaginator(output_type=cannabis_reports.models.Strain)
- 
classmethod 
get_seed_company(session, ucpc)[source]¶ Get the seed company that was responsible for a cannabis strain.
Parameters: Returns: - The seed company that was
 responsible for this strain.
Return type: 
- 
classmethod 
search(session, query, sort='name', path='search', limit=None)[source]¶ Gets products for a given strain with optional sorting.
Parameters: - session (requests.sessions.Session) – Authenticated session.
 - query (str) – The search query.
 - sort (str) – Snake cased field name to sort on. Prefix with a - for descending.
 - path (str) – The path for the search (eg for 
strainsit issearchand forextractsit istype. - limit (int, optional) – Stop after iterating this many pages.
 
Returns: An iterator of parent extracts.
Return type: RequestPaginator(output_type=cannabis_reports.models.Extract)
- 
classmethod