Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jcarbaugh/python-tortilla
A Python library for dipping into Salsa (Labs)
https://github.com/jcarbaugh/python-tortilla
Last synced: 22 days ago
JSON representation
A Python library for dipping into Salsa (Labs)
- Host: GitHub
- URL: https://github.com/jcarbaugh/python-tortilla
- Owner: jcarbaugh
- License: bsd-3-clause
- Created: 2014-03-04T22:16:22.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2019-05-15T13:37:00.000Z (over 5 years ago)
- Last Synced: 2024-12-01T09:12:47.830Z (25 days ago)
- Language: Python
- Homepage:
- Size: 14.6 KB
- Stars: 1
- Watchers: 7
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tortilla
A Python library for dipping into [Salsa](http://www.salsalabs.com).
** PROTOTYPE **
This is still very much a work in progress. I'm not sure what the final structure of this library will be; I've got a number of ideas floating around in the repo here. [I'm open to suggestions!](https://github.com/sunlightlabs/python-tortilla/issues)
## The Basic Client
Authentication
from tortilla.core import salsa
salsa.authenticate('salsa20XX', '[email protected]', 'asecurepassword')Save a new supporter
salsa.save('supporter', {'Email': '[email protected]'})
Updating a supporter
salsa.save('supporter', {'First_Name': 'Tomatillo'}, key=123456)
## Salsa Objects
There are Salsa objects that are meant to sit atop the underlying client methods.
a_person = salsa.supporter('123456')
a_person.Email = '[email protected]'
salsa.save(a_person)The exact API is still undetermined.
## Object definitions and fields
Salsa provides endpoints for inspecting the structure of object tables.
field_defs = salsa.describe(Supporter.object)
Field objects can be created from the definitions
from tortilla import fields
supporter_fields = fields.get_fields(field_defs)The field objects have methods for validating input and marshalling data.