Updated so you can create pass files in memory. #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I updated the API so that it allows for the creation of passbook pass files in memory rather than writing intermediary files to disk.
Writing files to disk in the way it was done previously can be problematic in a multi-threaded or multi-process environment where threads or processes could delete each other's files.
I updated the addFile() method so it takes a file name and a file like object. This was done so that files that were created in memory could be used as well as files that originally had a different file name than the file included in the final zip file.
I updated the create() method so that it returns a file object (By default a StringIO object) that can be read and sent to the browser in an HTTP response. You can override this so that the file gets written to disk or whatever if you like.