Skip to content

mklucz/stapi-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

stapi-python

A python client for the Star Trek API http://stapi.co/

Installation

$ pip3 install stapi

Usage

Searching for an entry:

>>> import stapi
>>> criteria = stapi.search_criteria.AnimalSearchCriteria(0, 50, "", avian=True)
>>> response = stapi.RestClient().animal.search(criteria)
# response now contains results from the API, in this case the first fifty animals which are avians

Fetching an entry using an uid:

>>> import stapi
>>> rest_client = stapi.RestClient()
>>> loracus = rest_client.astronomicalObject.get("ASMA0000012319")
>>> loracus.astronomicalObjectType
'PLANET'

About

python client for http://stapi.co/

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages