Import the class:
from MalwrAPI import MalwrAPI
Then, here are the different features:
res = MalwrAPI({'verbose': True}).submit_sample('/tmp/test.txt')
print res
res = MalwrAPI({'verbose': True}).get_recent_domains()
print res
res = MalwrAPI({'verbose': True}).get_public_tags()
print res
res = MalwrAPI({'verbose': True}).get_recent_analyses()
print res
res = MalwrAPI({'verbose': True}).get_latest_comments()
print res
res = MalwrAPI({'verbose': True}).search("LOGIN_TO_MALWR.COM","PASSWORD_TO_MALWR.COM","STRING_TO_SEARCH")
print res
So far, the API is pretty basic and submit files anonymously (not linked to your account). Next steps are: authentication on malwr.com, add search feature but also retrieve information about a specific sample.
Code was just a quick and dirty PoC, feel free to open issues, contribute and submit your Pull Requests. You can also ping me on Twitter (@PaulWebSec)