Dynamic Cli Save

A Modern, user-friendly command-line HTTP client for the API testing, and if you're stuck - Search and browse StackOverflow without leaving the CLI

Project README

dynamic-cli

dynamic-cli-cropped

PyPI <Sonarcloud quality gate> Downloads Downloads License: GPL v3 PyPI

A Modern, user-friendly command-line HTTP client for the API testing, and if you're stuck - Search and browse StackOverflow without leaving the CLI

Why Dynamic-cli?

The Command Line Utility

Although the Stackoverflow website is really cool, it can be tough to remember the same question that you faced earlier :

  • Countless answers, you can save it to playbook
  • Toggle between multiple answers is easy
  • Are you a developer ? Integrate your own feature and install it

dynamic-cli - A Supercharged Command Line Utility

dynamic_search

dynamic_saving_to_playbook dynamic_retrieving_from_playbook

dynamic_api

Index

Arguments⚙

Usage: Dynamic [OPTIONS]

A Modern, user-friendly command-line HTTP client for the API testing, and if you're stuck - Search and browse StackOverflow without leaving the CLI.

Options:

-st, --start -> Introduces Dynamic CLI
-v, --version -> Gives the Version of the CLI
-s, --search -> Search a question on Stackoverflow
-no, --notion -> Open browser to login to Notion.so
-d, --debug -> Turn on Debugging mode
-c, --custom -> Setup a custom API key
-p, --playbook -> To access all the answers saved in the playbook
-h, --help -> Shows this message and exit
-GET -> Make a GET request to an API
-POST -> Make a POST request to an API
-DELETE -> Make a DELETE request to an API

Installation

Pip Installation

PyPI version PyPI

dynamic-cli is hosted on PyPI. The following command will install Dynamic-cli:

pip3 install dynamic-cli

You can also install the latest dynamic-cli from GitHub source which can contain changes not yet pushed to PyPI:

pip3 install git+https://github.com/IndianOpenSourceFoundation/dynamic-cli.git

If you are not installing in a virtualenv, you might need to run with sudo:

sudo pip3 install dynamic-cli

pip3

Depending on your setup, you might also want to run pip3 with the -H flag:

sudo -H pip3 install dynamic-cli

For most linux users, pip3 can be installed on your system using the python3-pip package.

For example, Ubuntu users can run:

sudo apt-get install python3-pip

Virtual Environment Installation

You can install Python packages in a virtualenv to avoid potential issues with dependencies or permissions.

If you are a Windows user or if you would like more details on virtualenv, check out this guide.

Install virtualenv and virtualenvwrapper:

pip3 install virtualenv
pip3 install virtualenvwrapper
export WORKON_HOME=~/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh

Create a dynamic-cli virtualenv and install dynamic-cli:

mkvirtualenv dynamic-cli
pip3 install dynamic-cli

If the pip install does not work, you might be running Python 2 by default. Check what version of Python you are running:

python --version

If the call above results in Python 2, find the path for Python 3:

which python3  # Python 3 path for mkvirtualenv's --python option

Install Python 3 if needed. Set the Python version when calling mkvirtualenv:

mkvirtualenv --python [Python 3 path from above] dynamic-cli
pip3 install dynamic-cli

If you want to activate the dynamic-cli virtualenv again later, run:

workon dynamic-cli

To deactivate the dynamic-cli virtualenv, run:

deactivate

Supported Python Versions

  • Python 3.5 - Tested
  • Python 3.6 - Tested
  • Python 3.7 - Tested
  • Python 3.8 - Tested

Supported Platforms

  • Mac OS X
    • Tested on OS X 11.16.1
  • Linux, Unix
    • Tested on Ubuntu 20 LTS
  • Windows*
    • Tested on Windows 10/11 with WSL only [Currently, you need WSL for this]

Windows Support

dynamic-cli has been tested on Windows 10/11 with WSL installed. Please read the doc here

Developer Installation📦

1. Installing pip

sudo apt-get install python3-pip

2. Clone this repository to your local drive

git clone https://github.com/IndianOpenSourceFoundation/dynamic-cli.git

3. Go to dynamic directory

cd dynamic-cli/

4. Install dependencies

pip3 install -r requirements.txt

5. Install with pip

pip3 install -e .

If you face some issue running dynamic on mac, follow the below instructions

Note for mac users: Make sure to add these lines in you ~/.bashrc or ~/.zhsrc(depending upon your shell) 👇

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8

License

The project is licensed under the GNU General Public License v3. Check out LICENSE

Contributing

PRs Welcome Open Source Love

We're accepting PRs for our open and unassigned issues. Please check CONTRIBUTING.md. We'd love your contributions! Kindly follow the steps below to get started:

1. Fork this repository.

2. Clone the forked repository.

git clone https://github.com/<your-github-username>/project_name.git

3. Navigate to the project directory.

cd dynamic-cli

4. Make changes in source code.
P.S. If you want to add emojis 😁, use unicodes. Emoji unicodes can be found at https://unicode.org/emoji/charts/full-emoji-list.html
To include an emoji in a string, copy the unicode (Eg: U+1F600), replace + with 000 and prefix it with a \.
Eg: \U0001F604

5. Stage your changes and commit

# Add changes to Index
git add .

# Commit to the local repo
git commit -m "<your_commit_message>"

7. Push your local commits to the remote repo.

git push

8. Create a PR !

9. Congratulations! Sit and relax, you've made your contribution to Dynamic-CLI project.

Testing

We also have written unit tests for API features of dynamic-cli, if you have made changes to that section you can run tests as follows:

1. To run every test in dynamic-cli:

pytest

2. To run test related to only one feature for ex. for GET API Feature:

pytest -k test_get_api

Dynamic CLI is a part of these open source programs

Contributors👨🏽‍💻

Credit goes to these people:✨

Dynamic Cli Contributors
Open Source Agenda is not affiliated with "Dynamic Cli" Project. README Source: IndianOpenSourceFoundation/dynamic-cli

Open Source Agenda Badge

Open Source Agenda Rating