{"id":29430316,"url":"https://github.com/debarshee2004/termino-logistic","last_synced_at":"2025-07-12T17:06:45.532Z","repository":{"id":259569495,"uuid":"878227928","full_name":"debarshee2004/termino-logistic","owner":"debarshee2004","description":"CLI tool using python to send Requests","archived":false,"fork":false,"pushed_at":"2025-03-07T16:31:57.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-07T17:30:43.037Z","etag":null,"topics":["apertre25","friendly","opensource","python","tooling"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/debarshee2004.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-25T02:02:52.000Z","updated_at":"2025-03-07T16:32:59.000Z","dependencies_parsed_at":"2024-10-26T16:00:16.436Z","dependency_job_id":"d4b3f896-73b1-40d0-9104-9eec044e8596","html_url":"https://github.com/debarshee2004/termino-logistic","commit_stats":null,"previous_names":["debarshee2004/termino-logistic"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/debarshee2004/termino-logistic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debarshee2004%2Ftermino-logistic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debarshee2004%2Ftermino-logistic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debarshee2004%2Ftermino-logistic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debarshee2004%2Ftermino-logistic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/debarshee2004","download_url":"https://codeload.github.com/debarshee2004/termino-logistic/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/debarshee2004%2Ftermino-logistic/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265024859,"owners_count":23699621,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apertre25","friendly","opensource","python","tooling"],"created_at":"2025-07-12T17:06:44.999Z","updated_at":"2025-07-12T17:06:45.483Z","avatar_url":"https://github.com/debarshee2004.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Termino-logistic\n\nTermino-logistic is a powerful command-line interface (CLI) tool written in Python that allows users to send HTTP requests effortlessly. It is designed to streamline API interactions by supporting request configurations via YAML and JSON files. With Termino-logistic, users can execute various HTTP methods, manage request headers, send query parameters, and handle responses with ease. This tool is ideal for developers and testers who frequently interact with APIs and require a lightweight yet flexible solution.\n\n## Table of Contents\n- [Termino-logistic](#termino-logistic)\n  - [Table of Contents](#table-of-contents)\n  - [How to use](#how-to-use)\n    - [Input Output Redirection](#input-output-redirection)\n    - [Sample request file `myrequest.yml`](#sample-request-file-myrequestyml)\n    - [A full example file `myrequest.yml`](#a-full-example-file-myrequestyml)\n  - [How to Set Up the Project](#how-to-set-up-the-project)\n    - [Clone the Repository in Your Local Environment](#clone-the-repository-in-your-local-environment)\n    - [Setting Up the Environment](#setting-up-the-environment)\n    - [Building and Uploading the Package](#building-and-uploading-the-package)\n      - [Explanation:](#explanation)\n      - [Understanding `setup.py`](#understanding-setuppy)\n  - [How to contribute to this project](#how-to-contribute-to-this-project)\n    - [How you can improve the project](#how-you-can-improve-the-project)\n    - [How to contribute by writing test cases](#how-to-contribute-by-writing-test-cases)\n    - [How to contribute by writing docs](#how-to-contribute-by-writing-docs)\n    - [Important notes](#important-notes)\n    - [How to raise an issue](#how-to-raise-an-issue)\n    - [How to submit a pull request](#how-to-submit-a-pull-request)\n    - [Branch Naming Convention](#branch-naming-convention)\n  - [Conclusion](#conclusion)\n  - [License](#license)\n\n\n## How to use\n\nUse the terminal first follow the steps and the `setup.py` file to build this project. Then run the tool by running `termino --help` in the terminal.\n\n```sh\n# example with using a yml file\ntermino -f request.yml\n# example with using a json file\ntermino -f request.json\n\n# use the -c flag for colored response\n# example with using a yml file\ntermino -f -c request.yml\n# example with using a json file\ntermino -f -c request.json\n\n# Sending a GET request with custom headers (Note: this will override existing headers(if any) in .yml or .json file)\ntermino -f request.yml -H \"Authorization: Bearer mytoken\" -H \"User-Agent: CustomClient/1.0\"\n```\n\n### Input Output Redirection\n\n```sh\n# the response is written to stdout, and headers/status are written to stderr,\n# so that users can take IO redirection to their advantage.\ntermino -f myrequest.yml \u003e res.json 2\u003e res_headers.txt\n\n# both stdout and stderr can be redirected to the same file\ntermino -f myrequest.yml \u003e res.txt 2\u003e\u00261\n```\n\n### Sample request file `myrequest.yml`\n\n```yml\n# GET Request\nurl: https://cdn.animenewsnetwork.com/encyclopedia/api.xml?anime=4658\nmethod: GET\nparams:\n  offset: 2\n  limit: 100\nheaders:\n  accept: text/xml\n  accept-language: en\ntimeout: 5000\n```\n\n```yml\n# Download a book\nurl: http://do1.dr-chuck.com/pythonlearn/EN_us/pythonlearn.pdf\nmethod: GET\n```\n\n**By running the command** `termino -f myrequest.yml \u003e book.pdf`.\n\n### A full example file `myrequest.yml`\n\n```yml\nmethod: XXX # (REQUIRED) GET, OPTIONS, HEAD, POST, PUT, PATCH, or DELETE\nurl: XXX # (REQUIRED) must be prefixed with http:// or https://\n\nparams: # url query parameters. have as many as you like\n  offset: 0\n  limit: 10\n\ndata: # data for POST\n  name: john\n  age: 22\n  hobbies:\n    - running\n    - eating\n    - sleeping\n\ndata: # you can also type data in json format instead of yaml\n  {\n    \"name\": \"ash\",\n    \"age\": 10,\n    \"hobbies\": [\"catching pokemons\", \"eating\", \"travelling\"]\n  }\n\nheaders: # have as many as you like\n  Content-Type: application/json\n  Authorization: \u003cBearer Token\u003e\n\n\ncookies: # have as many as you like\n  mycookie: \u003cCookie Value\u003e\n  myothercookie: \u003cOther Cookie Value\u003e\n\ntimeout: 3.14 # seconds\n\nallow_redirects: true # true or false\n\nproxies: # have as many as you like\n  http: http://10.10.1.10:3128\n  https: https://10.10.1.11:1080\n  ftp: ftp://10.10.1.10:3128\n\n# EITHER verify server's TLS certificate. true or false\nverify: true\n# OR path to a CA bundle to use\nverify: some/folder/cacert.crt\n\n# EITHER path to single ssl client cert file (*.pem)\ncert: some/folder/client.pem\n# OR (*.cert), (*.key) pair.\ncert:\n  - some/folder/client.cert\n  - some/folder/client.key\n```\n\n## How to Set Up the Project\n\n### Clone the Repository in Your Local Environment\n\nStar and Fork the repository before cloning it into your local machine. Make sure you have Python `v3.12` installed with pip, also check that Git is installed.\n\n```sh\n# do replace the \u003cusername\u003e with your actual username\ngit clone https://github.com/\u003cusername\u003e/termino-logistic.git\n```\n\n### Setting Up the Environment\n\nFor this step, you can use a Conda environment or a Python virtual environment.\n\n```sh\n# For Conda\nconda env create -f environment.yml\nconda env list\nconda activate termino-logistic\n```\n\n```sh\n# For Python Environment\npython -m venv .venv\n.venv\\Scripts\\Activate.ps1\npip install -r requirements.txt\n```\n\n_Some extra Conda commands which can be helpful:_\n\n```sh\nconda env update --file environment.yml --prune\nconda env export --name termino-logistic \u003e environment.yml\nconda env remove --name termino-logistic\n```\n\n_Use `pip freeze` to check if the dependencies are properly installed:_\n\n```py\n# list of libraries\ncertifi==2025.1.31\ncharset-normalizer==3.4.1\ndocutils==0.21.2\nid==1.5.0\nidna==3.10\njaraco.classes==3.4.0\njaraco.context==6.0.1\njaraco.functools==4.1.0\nkeyring==25.6.0\nlxml==4.9.4\nmarkdown-it-py==3.0.0\nmdurl==0.1.2\nmore-itertools==10.6.0\nnh3==0.2.21\npackaging==24.2\nPygments==2.19.1\npywin32-ctypes==0.2.3\nPyYAML==6.0.2\nreadme_renderer==44.0\nrequests==2.32.3\nrequests-toolbelt==1.0.0\nrfc3986==2.0.0\nrich==13.9.4\nsetuptools==75.8.2\ntwine==6.1.0\nurllib3==2.3.0\nwheel==0.45.1\n```\n\n### Building and Uploading the Package\n\nTo build the package, use the following commands:\n\n```sh\npython3 setup.py sdist bdist_wheel\ntwine upload dist/*\n```\n\n#### Explanation:\n\n- `python3 setup.py sdist bdist_wheel` creates a source distribution (`sdist`) and a built distribution (`bdist_wheel`).\n- `twine upload dist/*` uploads the generated package files to PyPI for distribution.\n\n#### Understanding `setup.py`\n\nThe `setup.py` file defines how the package is structured and how it should be installed. Here is the key breakdown:\n\n```py\nimport pathlib\nfrom setuptools import setup\n\n# The directory containing this file\nHERE = pathlib.Path(__file__).parent\nREADME = (HERE / \"README.md\").read_text()\n\nwith (HERE / \"requirements.txt\").open() as f:\n    requirements = f.read().splitlines()\n\nsetup(\n    name=\"termino\",\n    version=\"0.0.0\",\n    description=\"cli tool using python to send request to a server\",\n    long_description=README,\n    long_description_content_type=\"text/markdown\",\n    url=\"https://github.com/debarshee2004/termino-logistic\",\n    license=\"Apache\",\n    entry_points={\n        \"console_scripts\": [\n            \"termino = app.main:main\",\n        ],\n    },\n    python_requires=\"\u003e=3.12\",\n    classifiers=[\n        \"License :: Apache License\",\n        \"Programming Language :: Python :: 3\",\n    ],\n    packages=[\"termino\"],\n    include_package_data=True,\n    install_requires=requirements,\n)\n```\n\n- It reads dependencies from `requirements.txt`.\n- Defines metadata like package name, version, description, license, and URL.\n- Specifies the entry point (`termino = app.main:main`), allowing the tool to be run as a CLI command.\n- Ensures compatibility with Python 3.12 and later.\n\n---\n\n## How to contribute to this project\n\nWe welcome contributions to Termino-logistic! Here are some ways you can help improve this project:\n\n### How you can improve the project\n\n1. **Bug fixes**: Find and fix bugs in the existing codebase\n2. **Feature enhancements**: Add new features or enhance existing ones\n3. **Performance improvements**: Optimize code for better performance\n4. **Code refactoring**: Improve code structure and maintainability\n5. **Cross-platform compatibility**: Ensure the tool works well across different operating systems\n\n### How to contribute by writing test cases\n\n1. Add test cases for existing functionality in the `tests/` directory\n2. Ensure your test cases cover both expected behavior and edge cases\n3. Make sure tests are clear, well-documented, and follow the existing testing pattern\n4. Run the test suite before submitting your contribution to ensure nothing breaks\n\n### How to contribute by writing docs\n\n1. Improve existing documentation for clarity and completeness\n2. Add documentation for new features or undocumented functionality\n3. Create tutorials or usage examples that showcase the tool's capabilities\n4. Fix typos, grammar issues, or formatting problems in existing documentation\n\n### Important notes\n\n- **Do not update the README.md file** directly without prior approval\n- If any configuration file needs to be updated, please message the maintainer on Discord first\n\n### How to raise an issue\n\n1. Before creating a new issue, check if a similar issue already exists\n2. Use the provided issue template to provide all necessary information\n3. Be specific about the problem, including steps to reproduce, expected behavior, and actual behavior\n4. Include version information (OS, Python version, package version)\n5. Add relevant logs, screenshots, or error messages\n\n### How to submit a pull request\n\n1. Fork the repository and create a new branch for your feature or bugfix\n2. Implement your changes following the project's coding style\n3. Add or update tests as necessary\n4. Ensure all tests pass before submitting\n5. Use the provided pull request template\n6. Link any related issues in your pull request description\n7. Be responsive to feedback and be prepared to make requested changes\n\nThank you for considering contributing to Termino-logistic!\n\n### Branch Naming Convention\n\nTo maintain a structured and organized development process, follow these branch naming conventions:\n\n- **Feature Branches**: `feature/\u003cshort-description\u003e` (e.g., `feature/add-logging`)\n- **Bug Fixes**: `fix/\u003cshort-description\u003e` (e.g., `fix/request-timeout`)\n- **Documentation Updates**: `docs/\u003cshort-description\u003e` (e.g., `docs/update-readme`)\n- **Hotfixes**: `hotfix/\u003cshort-description\u003e` (e.g., `hotfix/security-patch`)\n- **Experimental**: `experiment/\u003cshort-description\u003e` (e.g., `experiment/new-parser`)\n\nAlways create branches from the `main` branch unless instructed otherwise. Ensure your branch name is descriptive and concise.\n\n---\n\n## Conclusion\n\nTermino-logistic is a flexible and efficient CLI tool for interacting with APIs using YAML and JSON configurations. Whether you're testing endpoints, automating API calls, or handling HTTP requests in bulk, this tool simplifies the process. We encourage contributions and feedback from the community to enhance and expand the functionality of Termino-logistic.\n\n## License\n\nThis project is licensed under the Apache License. See the [LICENSE](./LICENSE) file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdebarshee2004%2Ftermino-logistic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdebarshee2004%2Ftermino-logistic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdebarshee2004%2Ftermino-logistic/lists"}