All Projects → zmasek → shamrock

zmasek / shamrock

Licence: MIT License
A Trefle API Library.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to shamrock

mundraub-android
📱Android App for Mundraub, Na-Ovoce and other fruit maps
Stars: ✭ 30 (+20%)
Mutual labels:  plants
Git-API
Gets info from github and transfers into json styled data
Stars: ✭ 18 (-28%)
Mutual labels:  requests
opentracing-utils
Convenient utilities for adding OpenTracing support in your python projects
Stars: ✭ 20 (-20%)
Mutual labels:  requests
Web-crawler-engineer-for-Python
Web-crawler-engineer-for-Python
Stars: ✭ 42 (+68%)
Mutual labels:  requests
spreadsheets-to-dataframes
Pycon 2021 Tutorial to help Spreadsheet (Excel) Users learn Python
Stars: ✭ 30 (+20%)
Mutual labels:  requests
get youtube subtitle
📺 Youtube字幕下载脚本
Stars: ✭ 56 (+124%)
Mutual labels:  requests
NodeKit
surfstudio.github.io/nodekit
Stars: ✭ 27 (+8%)
Mutual labels:  requests
django-debug-toolbar-requests
A Django Debug Toolbar panel for most popular http library requests.
Stars: ✭ 16 (-36%)
Mutual labels:  requests
YouTube-Tutorials--Italian
📂 Source Code for (some of) the Programming Tutorials from my Italian YouTube Channel and website ProgrammareInPython.it. This is just a small portion of the content: please visit the website for more.
Stars: ✭ 28 (+12%)
Mutual labels:  requests
seeds2
A Python application for live tweeting photos of your seeds growing on your Raspberry Pi.
Stars: ✭ 26 (+4%)
Mutual labels:  plants
TwitterMediaDownloader
downloads photos and videos from twitter
Stars: ✭ 15 (-40%)
Mutual labels:  requests
reqwasm
HTTP requests library for WASM Apps
Stars: ✭ 81 (+224%)
Mutual labels:  requests
rigor
HTTP-based DSL for for validating RESTful APIs
Stars: ✭ 65 (+160%)
Mutual labels:  requests
pyscrapper
📷 web scrapping in python: multiple libraries -requests, beautifulsoup, mechanize, selenium
Stars: ✭ 50 (+100%)
Mutual labels:  requests
wappdriver
Wondering how to send WhatsApp messages using Python using only 3 lines of code? You have come to the right place!
Stars: ✭ 40 (+60%)
Mutual labels:  requests
RESTEasy
REST API calls made easier
Stars: ✭ 12 (-52%)
Mutual labels:  requests
tiktok-downloader
Tiktok Downloader/Scraper using requests & bs4
Stars: ✭ 47 (+88%)
Mutual labels:  requests
nap
Convenient way to request HTTP APIs
Stars: ✭ 42 (+68%)
Mutual labels:  requests
NetworkAgent
This package is meant to make http request of an easy way inspiren in the architecture of Moya package. This package is 100% free of dependencies and works with Combine api + Codable
Stars: ✭ 16 (-36%)
Mutual labels:  requests
Interface TestPlatform
python3+django+requests+ddt+unittest接口自动化测试平台
Stars: ✭ 52 (+108%)
Mutual labels:  requests

Shamrock - A Trefle API Library

Coverage Status Documentation Status

Shamrock is a Python shallow API library for Trefle integration. It enables interacting with the Trefle plants API in Python to get the information needed for various things you might want to use the API with such as research, gardening software, automation, etc. It is made for use with Python 3.6 and above.

For the full documentation refer to Shamrock documentation.

For more information what the Trefle service provides, refer to the Trefle API documentation. It is also useful for checking out how to use the API with Shamrock library.

Installation

pipenv install shamrock

or

pip install shamrock

Simple Usage Example

from shamrock import Shamrock
api = Shamrock('mytoken')
species = api.species()

Advanced Usage

You can configure the API initially like this:

api = Shamrock(TOKEN)

Methods that can be run with the API are:

api.kingdoms()
api.subkingdoms()
api.divisions()
api.division_classes()
api.division_orders()
api.families()
api.genus()
api.plants()
api.species()

They correspond to the Trefle API endpoints.

You can also query a specific item from the database:

api.plants(103505)

Searching is covered with a separate method:

api.search("tomato")

Navigating the API is covered with these methods:

api.next()
api.prev()
api.first()
api.last()

It will work only if you previously made a request. For example:

api.species()
api.next()

You can also use the varoius query string options described on Trefle API documentation as keyword arguments in methods, however, be careful when unpacking filters, for example:

filters = {"filter[common_name]" : "blackwood"}
api.species(**filters)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].