Skip to content

SOBotics/libapicache-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libapicache

Python 3 interface library for APICache

Installation

Use Python 3 pip (either with --user for a per-user install, or with sudo for a global install):

$ pip3 install libapicache --user
# OR #
$ sudo -H pip3 install libapicache

Usage

from libapicache import APICache


cache = APICache('https://cache.example.org')  # no trailing slash
response = cache.posts_by_id(['38472654'], key='IQlbo34sc932sdrg23((', site='stackoverflow.com')

if not response.is_error():
    for post in response.items:
        print("Got post {} from Stack Overflow. Score: {}".format(post['post_id'], post['score']))
else:
    print("Uh oh! Error: {} (ID: {})".format(response.error_message, response.error_id))

Refer to APICache's documentation (visit /docs/quickstart on your chosen APICache server) for further information about the routes libapicache is calling.

About

Python interface library for APICache

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages