Coder Social home page Coder Social logo

clack's Introduction

CLACK

Clack is a Command Line API Calling Kit based on Click.

Clack is no longer maintained but the code is still available here and on GitLab.

You can also clone the code from the last tag.

Feel free to pickup development and clone this repo or the version on GitLab.

๐Ÿ‘‹๐Ÿ‘‹๐Ÿ‘‹

clack's People

Contributors

rmnl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

clack's Issues

Support Python 3

Currently Clack does not work with Python 3. This should change.

Clack 2.0.0b9 : output format always py

$ clack --version
Clack-2.0.0b9
$ clack call -e my_env /videos/list '{"limit": 1}'
Call settings:

api type      : ms1
api host      : https://api.jwplatform.com
verify ssl    : True
endpoint      : videos/list
params        : {"limit": 1}
key/username  : key
secret        : ********
output format : py

$ clack call --output json -e my_env /videos/list '{"limit": 1}'
Call settings:

api type      : ms1
api host      : https://api.jwplatform.com
verify ssl    : True
endpoint      : videos/list
params        : {"limit": 1}
key/username  : key
secret        : ********
output format : py

$ clack call -o json -e my_env /videos/list '{"limit": 1}'
Call settings:

api type      : ms1
api host      : https://api.jwplatform.com
verify ssl    : True
endpoint      : videos/list
params        : {"limit": 1}
key/username  : key
secret        : ********
output format : py

I cut the actual response from the listing, but it's indeed py. Same works for 1.x.x

Cannot create new config file while in Virtual Env

Hi!
Installed Clack on local MBP, but ran into a problem with setting up a config file while inside a Virtual Env. Runs fine when not in Virtual Env.

Installed it to my Virtual Env via

pip install --upgrade clack-cli

Ran clack init and entered my information, but then fails with the traceback message. Have also tried with sudo clack init --force

clack init

Traceback (most recent call last):
File "/Users/azeng/Desktop/upload/bin/clack", line 11, in
sys.exit(clack())
File "/Users/azeng/Desktop/upload/lib/python2.7/site-packages/click/core.py", line 722, in call
return self.main(*args, **kwargs)
File "/Users/azeng/Desktop/upload/lib/python2.7/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/Users/azeng/Desktop/upload/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/azeng/Desktop/upload/lib/python2.7/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/azeng/Desktop/upload/lib/python2.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/Users/azeng/Desktop/upload/lib/python2.7/site-packages/clack/clack.py", line 717, in init
config = edit_environment(config, *args, **kwargs)
File "/Users/azeng/Desktop/upload/lib/python2.7/site-packages/clack/clack.py", line 140, in edit_environment
keyring.set_password(keyring_id(name), key, secret)
File "/Users/azeng/Desktop/upload/lib/python2.7/site-packages/keyring/core.py", line 47, in set_password
_keyring_backend.set_password(service_name, username, password)
File "/Users/azeng/Desktop/upload/lib/python2.7/site-packages/keyring/backends/OS_X.py", line 37, in set_password
raise PasswordSetError("Can't store password on keychain")
keyring.errors.PasswordSetError: Can't store password on keychain

As mentioned, installing clack outside of Virtual Env and setting a config works. Can access config while in virtual env after setting them up outside.

Requesting Linux keyring support (update docs to show options)

Currently it appears that the install process, and the keyring requirement for the secret, are based on running this on a Mac (OS/X).

Is there a way to make it compatible with Linux?

We're happy putting the secret in the config.ini, but running clack settings add under Linux doesn't work, as it will not create the config.ini file initially, and even if we touch the file and proceed, it fails on the requirement of keyring support to record the secret in the configuration.

Options are broken

I tried:

$clack call --csv-file ./tagskeys4_sample.csv /videos/update "{'video_key': '<<Key>>', 'custom.category': '<<Category>>', 'custom.series': '<<Series>>'}"

It returned:

Error: no such option: --csv-file

I dug into the code a bit and tried the alternative:

$clack call -c ./tagskeys4_sample.csv /videos/update "{'video_key': '<<Key>>', 'custom.category': '<<Category>>', 'custom.series': '<<Series>>'}"

It returned:

Error: no such option: -c

Then, just to see if any options worked:

$clack call -o
Error: no such option: -o

$clack call -v
Error: no such option: -v

I'm using the most recent version of Clack in a virtualenv per the documentation on Github.

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.