Commit Graph

13 Commits

Author SHA1 Message Date
dadc6c222d Moving to Poetry 2019-04-26 15:50:41 +02:00
522356c4ff Add support (and fix bug) for Python 3.7 2018-09-17 18:44:43 +02:00
c8eec9fa9d Added pickle support for Resource classes, albeit a bit hacky.
Unpickling requires the class to be known, so we can't simply use to_dict()
to pickle and pass the dict to __init__() to unpickle. This works for the
pickled object itself (as pickle restores its type), but fails to restore
the class of subobjects, such as some_node.picture. This is why the code
now pickles each subobject too.
2017-09-19 13:43:48 +02:00
ea33d69a8e Switched to different datetime formatting in JSON.
We now use the same format as the Pillar API.
2016-11-07 10:55:49 +01:00
011bfa9809 Prevented error when response doesn't have _items. 2016-07-21 16:34:52 +02:00
8dfb0a193b Added Node.create_asset_from_file() utility function
This also adds some unittests using the Responses library.
2016-07-05 16:47:51 +02:00
a98986a261 Added pillarsdk.utils.is_valid_id(some_id) function.
This allows Pillar-Web to check for ID validity before sending IDs
from the URL to Pillar.
2016-06-29 13:05:04 +02:00
9a51c82d9a Added util function for filename sanitation 2016-03-22 14:32:34 +01:00
dac5d638da Added support for saving Pillar resources as JSON. 2016-03-22 12:42:31 +01:00
ba15c830c5 PEP8 formatting 2016-03-18 16:56:28 +01:00
886e3c7eaf Sort parameters on the URL to allow caching.
Python randomizes dict item order with a random seed, which changes every
time Python/Blender is run. As a result, Pillar GET parameters on the URL
would change, making them uncachable. Sorting the parameters solves this.
2016-03-18 16:37:16 +01:00
b690755b84 Made utils.merge_dict None-safe, and removed lots of "thing or {}" 2016-03-11 10:24:19 +01:00
418b15caf4 Added dict → JSON and unicode → UTF8 conversion for URL parameters. 2016-03-08 13:52:51 +01:00