Coder Social home page Coder Social logo

bepasty-client-cli's People

Contributors

dansan avatar makefu avatar momorientes avatar thomaswaldmann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bepasty-client-cli's Issues

cli not python3 ready?

I get this error after installing with python3, this is not the case with python2:

Traceback (most recent call last):
  File "/usr/local/bin/bepasty-cli", line 11, in <module>
    load_entry_point('bepasty-client-cli==0.3.0', 'console_scripts', 'bepasty-cli')()
  File "/home/martin/.local/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/martin/.local/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/martin/.local/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/martin/.local/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/bepasty_client_cli-0.3.0-py3.6.egg/bepasty_cli/cli.py", line 200, in main
  File "/usr/local/lib/python3.6/dist-packages/bepasty_client_cli-0.3.0-py3.6.egg/bepasty_cli/cli.py", line 262, in upload
AttributeError: 'str' object has no attribute 'decode'

memory issue when giving large stuff via stdin

the code that deals with file content read from stdin reads the complete input into memory to create a BytesIO object.

that's ok for small stuff, but not for larger stuff as it can allocate lots of memory, even more than you have.

using a tmpfile for that is also problematic as the tmpfile may reside on a tmpfs (that has limited size and is in RAM also). but at least this would be an issue not caused by our code. :)

the problem that requires above mentioned solutions is that we need to seek inside the data, at least with the current implementation, and that is not possible when using stdin directly.

support for configuration file

Load defaults for all arguments from a configuration file and overwritten values by given cmdline arguments.

  • ignore list
  • use default for fname only if piped input
  • use default for ftype only as fallback if it cannot be magically detected

Questions:

  • security for token - is chmod 600 for the file enough?
  • file format?
  • cmdline argument that triggers "store current cmdline arguments to the conffile"? (makes it less error prone for users, allows to use less human friendly file formats like json)

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.