djacobs / PyAPNs

Python library for interacting with the Apple Push Notification service (APNs)
http://pypi.python.org/pypi/apns/
MIT License
1.22k stars 374 forks source link

Support memory-mapped files or file-like objects(StringIO?) for APNS interface. #31

Closed dhruv closed 11 years ago

dhruv commented 11 years ago

Some hosted platforms just dont like files and have blobstorage of various sorts. Would it help if the interface supported file-like objects for the cert file and key file? I am happy to take a crack at it if @djacobs would consider it useful.

djacobs commented 11 years ago

Certainly, thank you for the thought.

dhruv commented 11 years ago

Turns out the python stdlib ssl library does not really like anything but filenames throughout and it runs pretty deep.

What I was looking for was a library which would patch python file operations such that a filepath with a scheme e.g. 'memfs://filepath' would patch all read/write operations. Unfortunately I couldn't find something that would do it.

Turns out I have a workaround for now :) Closing this issue. If you have ideas on how I could achieve what I originally needed to, please let me know and I will work on it.