Git Product home page Git Product logo

flask-cloudy's People

Contributors

alexa-infra avatar amanto avatar bramjochems avatar ltiao avatar mardix avatar pykong avatar sumukh avatar wassname avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flask-cloudy's Issues

ambiguation between flask.request and six.urllib.request

[Edited after some further investigations from my end]

I have copied the example code more or less verbatim, but have an issue when downloading files; I then get the error message:

builtins.AttributeError
AttributeError: module 'six.moves.urllib.request' has no attribute 'args'

the issue seems to be in line 421 of flask_cloudy.py:

dl = request.args.get("dl")

The issue here seems that the request object here refers to the request object imported from six.moves.urllib rather than the flask.request object.

Created a pull request that I believe would fix this

flask_cloudy.InvalidExtensionError

Problem:
I got an error flask_cloudy.InvalidExtensionError
I try:

f = request.files.get("myfile")
my_upload = storage.upload(f, extension=['fa'])
f = request.files.get("myfile")
my_upload = storage.upload(f, extension=['.fa'])

Can anyone guide me what is the way of adding extention.

error with

hi, when I use your function in my app, almost same code with your example code, I got following error, do you know what 's going on ?

werkzeug.routing.BuildError: Could not build url for endpoint 'FLASK_CLOUDY_SERVER' with values ['object_name']. Did you mean 'CheckJob' instead?
127.0.0.1 - - [23/Dec/2018 23:19:37] "GET /view/figure-3.png HTTP/1.1" 500 -
Thanks

Typo of key word in docs

In the following line in the README.md:

Storage.upload(file, name=None, prefix=None, allowed_extesion=[], overwrite=Flase, public=False)

I believe flase should be false.
(btw love the api)

Error case when run example

Traceback (most recent call last):
File "/home/chenxiao/myproject/flask-cloudy/example/app.py", line 16, in
storage.init_app(app)
File "/home/chenxiao/myproject/flask-cloudy/flask_cloudy.py", line 217, in init_app
"directory or doesn't exist for LOCAL provider" % container)
OSError: Local Container (directory) './data' is not a directory or doesn't exist for LOCAL provider

ValueError: Invalid format string thrown in download_url

When I tried to run the example provided connecting to an S3 amazon bucket, I get "ValueError: Invalid format string" thrown from line 642 in flask_cloudy.py from the line datetime.timedelta(seconds=timeout)).strftime("%s") in download_url function. I am running my example in Windows, and from my research, "%s" is not a valid format string for strftime (https://docs.python.org/2/library/time.html#time.strftime). I was able to work around this using some other format for now

Exception in cloudfiles ex_get_temp_object_url

This line throws an exception when trying to use cloudfiles ex_get_temp_object_url.

self.driver.ex_get_object_temp_url(self._obj,  method="GET",  timeout=expires)
TypeError: unsupported operand type(s) for +: 'float' and 'str'

The value of expires is a string but looking at the apache-libcloud source code here looks like the argument timeout should be a number (int/float) rather than string.

expires = int(time() + timeout)

Integration with databases

Are there plans for integrating this lib with databases?
Maybe having FileField and ImageField classes, a la django-storage.
If so, I would be happy to contribute.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.