This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A simple Python client library for the Mashery API

Project Description

A simple Python client library for the Mashery API.

Example

Query recently created apps:

from masheryclient.jsonrpc import MasheryJsonRpcApi

json_rpc_api_client = MasheryJsonRpcApi(
    MASHERY_SITE_ID,
    MASHERY_SERVICE_KEY,
    MASHERY_API_KEY,
    MASHERY_API_SECRET
)

mashery_query = 'SELECT * FROM applications ORDER BY created DESC ITEMS 10'
r = json_rpc_api_client.query(mashery_query)['items']

for app in r:
    print app['name']

Top API callers within the specified time period:

reporting_client = MasheryReportingApi(
    MASHERY_SITE_ID,
    MASHERY_SERVICE_KEY,
    MASHERY_API_KEY,
    MASHERY_API_SECRET,
)

r = reporting_client.developer_activity_for_service(start_date_str, end_date_str, limit)

app_list = []
for app in r:
    api_key = app['serviceDevKey']
    call_count_success = app['callStatusSuccessful']
    call_count_blocked = app['callStatusBlocked']
    call_count_other = app['callStatusOther']
Release History

Release History

This version
History Node

0.1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
masheryclient-0.1.0.tar.gz (4.8 kB) Copy SHA256 Checksum SHA256 Source Feb 28, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting