Various file storage backends for Flask applications.
kvesteri / flask-storage Goto Github PK
View Code? Open in Web Editor NEWVarious file storage backends for Flask applications.
License: MIT License
Various file storage backends for Flask applications.
License: MIT License
I am working with Python 3.5.1 / Window 8.1
>>pip install -e git://github.com/kvesteri/flask-storage.git#egg=Flask-Storage
This is the outcome:
Obtaining Flask-Storage from git+git://github.com/kvesteri/flask-storage.git#egg=Flask-Storage
Updating c:\users\rodolfo\desktop\dumppython\flask\venv\src\flask-storage clone
Requirement already satisfied: Flask>=0.7 in c:\users\rodolfo\desktop\dumppython\flask\venv\lib\site-packages (from Flask-Storage)
Requirement already satisfied: boto>=2.5.2 in c:\users\rodolfo\desktop\dumppython\flask\venv\lib\site-packages (from Flask-Storage)
Collecting python-cloudfiles>=1.7.10 (from Flask-Storage)
Using cached python-cloudfiles-1.7.11.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Rodolfo\AppData\Local\Temp\pip-build-t2cefnr2\python-cloudfiles\setup.py", line 6, in <module>
from cloudfiles.consts import __version__
File "C:\Users\Rodolfo\AppData\Local\Temp\pip-build-t2cefnr2\python-cloudfiles\cloudfiles\__init__.py", line 82, in <module>
from cloudfiles.connection import Connection, ConnectionPool
File "C:\Users\Rodolfo\AppData\Local\Temp\pip-build-t2cefnr2\python-cloudfiles\cloudfiles\connection.py", line 13, in <module>
from urllib import urlencode
ImportError: cannot import name 'urlencode'
As mentioned in #8, Python's file objects don't support an offset
argument to read
. Based on the docs, Amazon's keys don't support that either, so its functionality should be tested. It should also be made sure the other storages don't make this mistake and support a uniform API concerning read
and seek
.
I'm trying to save a file inside a Celery task with FileSystemStorage, but it fails due to infinite recursion:
File "flask-storage/flask_storage/filesystem.py", line 160, in __getattr__
return getattr(self.file, name)
File "flask-storage/flask_storage/filesystem.py", line 140, in file
self._file = open(self.fullname, 'rb')
File "flask-storage/flask_storage/filesystem.py", line 145, in fullname
return self.storage.path(self.name)
File "flask-storage/flask_storage/base.py", line 239, in storage
return self._storage
File "flask-storage/flask_storage/filesystem.py", line 160, in __getattr__
return getattr(self.file, name)
File "flask-storage/flask_storage/filesystem.py", line 140, in file
self._file = open(self.fullname, 'rb')
File "flask-storage/flask_storage/filesystem.py", line 145, in fullname
return self.storage.path(self.name)
File "flask-storage/flask_storage/base.py", line 239, in storage
return self._storage
...
Would it be possible to support Google Cloud Storage along with Amazon and Cloudfiles?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.