Skip to main content

Programatic access to the Code42 paltform api

Project description

CrashPlan API
This project aims to provide a simple interface to the public resources
of the CrashPlan API with support for the new versioned API.

***NOTE!!*** The current state of the project isn't here yet but this is the goal.

# Simple request to Computer resource (most recent version)
>>> resp = Platform42Api.get("", Computer, APISession())

# Same resource but older version
>>> params = { 'some_old_api_param' : 'foo' }
>>> resp = Platform42Api.get("", Computer, APISession(maxVersion=0), data=params) # Use an old api

# Authentication. It was transparently handled in the APISession above but here is how you can change
# it yourself. Don't be alarmed about the dynamic type creation, I just don't want to put a regular object
# definition here.
>>> s = APISession(auth_provider= type('provider' , (object, ), {'getAuth' : lambda: ('user', 'password')}))
>>> resp = Platform42Api.put("", Computer, s)
>>> resp.status_code

**For the app:**

- [requests][1]

**To run tests:**

- [nose][2]
- [nose-exclude][3]
- [coverage][4]
- [doctest][5]

Recommended Development Setup
* Install virtualenvwrapper. Follow additional setup here [readthedocs][6]

> pip install virtualenvwrapper

* Create a project to work on

> mkvirtualenv --no-site-packages platform42

* Setup IDE of your choice. I recommend [Eclipse][7] + [PyDev][8] or [LiClipse][9]. Setup the project in your IDE to use your virtualenv's interpreter and libraries
In the editors I listed this can be accomplished by manually setting up an interpreter and pointing it at [your virtualenv path]/bin/python.

* Install the requirements listed above. Execute the following while in the virtualenv created earlier. This script sits in the bin directory of the project.

> ./bin/ -i


Project details

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page