diff options
author | kballou <kballou@devnulllabs.io> | 2015-04-10 17:15:35 -0600 |
---|---|---|
committer | kballou <kballou@devnulllabs.io> | 2015-04-10 18:03:44 -0600 |
commit | 8dbefc231fad90acc6910ebbbe2b35f152d42956 (patch) | |
tree | 098089c59328de2aac6d052b63fc0852267b44bd | |
parent | 87e5aea4957a6e3eaab0e8c0fca060e4475e1f14 (diff) | |
download | pylibchorus-8dbefc231fad90acc6910ebbbe2b35f152d42956.tar.gz pylibchorus-8dbefc231fad90acc6910ebbbe2b35f152d42956.tar.xz |
Update README: add sample usage
* Also add some notes about development of this project
-rw-r--r-- | README.markdown | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/README.markdown b/README.markdown index 6cfe413..4f0a731 100644 --- a/README.markdown +++ b/README.markdown @@ -5,6 +5,34 @@ This intends to be a near complete Python language binding of the [Chorus API][1]. +The library itself will likely be very unstable for a little while as +its development progresses. + +## Sample Usage ## + +Here is a sample interactive session that demonstrates the current +usage. + + >>> import pylibchorus + >>> from ConfigParser import SafeConfigParser + >>> config = SafeConfigParser() + >>> config.read('/tmp/alpine.cfg') + ['/tmp/alpine.cfg'] + >>> with pylibchorus.ChorusSession(config) as session: + ... print(session.sid) + ... resp = pylibchorus.check_login_status(session) + ... print(resp.status_code) + ... json = resp.json() + ... print(json['response']['session_id']) + ... + 49fb8e27e591d9ccb6f0006334eedb8e4d8004a5 + 200 + 49fb8e27e591d9ccb6f0006334eedb8e4d8004a5 + >> quit() + +Notice, some of the interactions that depend on the `requests` +library may be cleaned up in the future, enabling easier interaction +with this library. ## License ## |