caos


Namecaos JSON
Version 3.0.1 PyPI version JSON
download
home_pagehttps://github.com/caotic-co/caos/
SummaryA simple dependency management tool and tasks executor for Python projects
upload_time2023-10-10 06:23:53
maintainer
docs_urlNone
authorCamilo Ospina
requires_python>=3.6
license
keywords caos virtualenv dependencies manager poetry pip-tools npm pnpm bun maven composer pipenv venv easy_install setuptools wheel
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![](https://raw.githubusercontent.com/caotic-co/caos/master/img/caos.png)](https://github.com/caotic-co/caos)

[![](https://img.shields.io/pypi/v/caos)](https://pypi.org/project/caos/)
[![](https://img.shields.io/pypi/dm/caos)](https://pypi.org/project/caos/)
[![](https://img.shields.io/github/license/caotic-co/caos)](https://raw.githubusercontent.com/caotic-co/caos/master/LICENSE)
[![](https://img.shields.io/github/actions/workflow/status/caotic-co/caos/python-package.yml
)](https://github.com/caotic-co/caos/actions/workflows/python-package.yml)

The **"caos"** Python library is a dependency management and task automation tool that works for **Python 3.6, 3.7, 3,8, 3.9, 3.10, 3.11, and 3.12** that requires only **pip** and **virtualenv**. It simplifies the management of project dependencies and tasks within Python development. Similar to npm or pnpm in the JavaScript ecosystem, caos allows developers to do:

* **Dependency Tracking:** Easily track project dependencies using semantic versioning in a YAML file, eliminating the need for a traditional requirements.txt file.

* **Dependency Installation:** Seamlessly install and manage dependencies based on the specified versions, ensuring consistency and reliability in your Python projects.

* **Custom Scripting:** Create custom, platform-independent scripts or tasks within the same YAML configuration, making it convenient to automate various aspects of your development workflow.

* **Enhanced Pip Integration:** Build on top of pip, caos streamlines interaction with Python packages while providing a more flexible and intuitive configuration format.

Overall, the "caos" library empowers Python developers with a streamlined and user-friendly approach to dependency management and task automation, making it a valuable addition to any Python project.

-----

# Requirements

Make sure that you have a working **Python >= 3.6** with **pip** and **virtualenv** installed and then execute   


Example of a web project using CAOS
------------
This code example demonstrates the development of a Flask-based web application while leveraging the "caos" library for dependency management, unit testing, and execution control.

**Sample Project Structure:**
~~~
my_project (Project's root Folder)
|___ caos.yml
|___ main.py
|___ tests
    |___ test.py
~~~

#### Key Components:

**main.py:** This file contains the Flask application code, including route definitions and business logic.

**caos.yml:** Instead of a traditional requirements.txt file, we use a YAML file to specify project dependencies and their semantic versioning constraints. "caos" manages the installation of these dependencies.

Also within this YAML file, we define custom tasks and scripts to automate various aspects of our development workflow. These tasks can include running unit tests, starting the Flask development server, or performing other project-specific actions.


### Usage:

1. Install "caos" using pip:
```
pip install caos
```
2. Create a python application (main.py for this example)
```python
from flask import Flask
app = Flask(__name__)


@app.route('/')
def hello():
    return "Hello World!"

if __name__ == '__main__':
    app.run(host="127.0.0.1", port="8080")
```

3. Configure the "caos.yml" file with project dependencies and any custom tasks such as running unit tests or starting the Flask app.
```yaml
virtual_environment: "venv"

dependencies:
  pip: "latest"
  flask: "~1.1.0"

tasks:
  unittest:
    - "caos python -m unittest discover -v ./tests"

  start:
    - "caos python ./main.py"

  test_and_start:
    - unittest
    - start
```

5. Create some unit tests (test.py for this example)
```python
import unittest
from main import app

class TestApp(unittest.TestCase):

    def test_hello_world(self):
        self.app = app.test_client()
        response = self.app.get('/')
        self.assertEqual(200, response.status_code)
        self.assertIn(b'Hello World!', response.data)


if __name__ == '__main__':
    unittest.main()
```

6. Run "caos" commands to manage dependencies and execute tasks, e.g.:

   * **"caos init"** to create a virtual environment for the project.
   * **"caos update"** to install project dependencies.
   * **"caos check"** to check the right versions of the dependencies are installed.
   * **"caos run unittest"** to run the custom step to execute unit tests.
   * **"caos run start"** to run the custom step to start the Flask development server.
   * **"caos run test_and_start"** to both test first and then start the Flask development server.

![](https://raw.githubusercontent.com/caotic-co/caos/master/img/usage_example.gif)


### Benefits:

**Simplified Dependency Management:** Using "caos" and the "caos.yml" file streamlines the installation and tracking of project dependencies with semantic versioning.

**Efficient Task Automation:** Custom tasks defined in "caos.yml" facilitate automation of common development tasks, enhancing productivity.

**Improved Project Maintenance:** This setup ensures that the project remains organized, allowing for easier collaboration and maintenance.

-----

### For more detailed information about the commands available check the [Documentation](https://github.com/caotic-co/caos/blob/master/docs/README.md).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/caotic-co/caos/",
    "name": "caos",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "caos virtualenv dependencies manager poetry pip-tools npm pnpm bun maven composer pipenv venv easy_install setuptools wheel",
    "author": "Camilo Ospina",
    "author_email": "camilo.ospinaa@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/de/fe/56378624e294a74361a94198d6540c671413146ae1bc966592c6ac157bb2/caos-3.0.1.tar.gz",
    "platform": "Windows",
    "description": "[![](https://raw.githubusercontent.com/caotic-co/caos/master/img/caos.png)](https://github.com/caotic-co/caos)\n\n[![](https://img.shields.io/pypi/v/caos)](https://pypi.org/project/caos/)\n[![](https://img.shields.io/pypi/dm/caos)](https://pypi.org/project/caos/)\n[![](https://img.shields.io/github/license/caotic-co/caos)](https://raw.githubusercontent.com/caotic-co/caos/master/LICENSE)\n[![](https://img.shields.io/github/actions/workflow/status/caotic-co/caos/python-package.yml\n)](https://github.com/caotic-co/caos/actions/workflows/python-package.yml)\n\nThe **\"caos\"** Python library is a dependency management and task automation tool that works for **Python 3.6, 3.7, 3,8, 3.9, 3.10, 3.11, and 3.12** that requires only **pip** and **virtualenv**. It simplifies the management of project dependencies and tasks within Python development. Similar to npm or pnpm in the JavaScript ecosystem, caos allows developers to do:\n\n* **Dependency Tracking:** Easily track project dependencies using semantic versioning in a YAML file, eliminating the need for a traditional requirements.txt file.\n\n* **Dependency Installation:** Seamlessly install and manage dependencies based on the specified versions, ensuring consistency and reliability in your Python projects.\n\n* **Custom Scripting:** Create custom, platform-independent scripts or tasks within the same YAML configuration, making it convenient to automate various aspects of your development workflow.\n\n* **Enhanced Pip Integration:** Build on top of pip, caos streamlines interaction with Python packages while providing a more flexible and intuitive configuration format.\n\nOverall, the \"caos\" library empowers Python developers with a streamlined and user-friendly approach to dependency management and task automation, making it a valuable addition to any Python project.\n\n-----\n\n# Requirements\n\nMake sure that you have a working **Python >= 3.6** with **pip** and **virtualenv** installed and then execute   \n\n\nExample of a web project using CAOS\n------------\nThis code example demonstrates the development of a Flask-based web application while leveraging the \"caos\" library for dependency management, unit testing, and execution control.\n\n**Sample Project Structure:**\n~~~\nmy_project (Project's root Folder)\n|___ caos.yml\n|___ main.py\n|___ tests\n    |___ test.py\n~~~\n\n#### Key Components:\n\n**main.py:** This file contains the Flask application code, including route definitions and business logic.\n\n**caos.yml:** Instead of a traditional requirements.txt file, we use a YAML file to specify project dependencies and their semantic versioning constraints. \"caos\" manages the installation of these dependencies.\n\nAlso within this YAML file, we define custom tasks and scripts to automate various aspects of our development workflow. These tasks can include running unit tests, starting the Flask development server, or performing other project-specific actions.\n\n\n### Usage:\n\n1. Install \"caos\" using pip:\n```\npip install caos\n```\n2. Create a python application (main.py for this example)\n```python\nfrom flask import Flask\napp = Flask(__name__)\n\n\n@app.route('/')\ndef hello():\n    return \"Hello World!\"\n\nif __name__ == '__main__':\n    app.run(host=\"127.0.0.1\", port=\"8080\")\n```\n\n3. Configure the \"caos.yml\" file with project dependencies and any custom tasks such as running unit tests or starting the Flask app.\n```yaml\nvirtual_environment: \"venv\"\n\ndependencies:\n  pip: \"latest\"\n  flask: \"~1.1.0\"\n\ntasks:\n  unittest:\n    - \"caos python -m unittest discover -v ./tests\"\n\n  start:\n    - \"caos python ./main.py\"\n\n  test_and_start:\n    - unittest\n    - start\n```\n\n5. Create some unit tests (test.py for this example)\n```python\nimport unittest\nfrom main import app\n\nclass TestApp(unittest.TestCase):\n\n    def test_hello_world(self):\n        self.app = app.test_client()\n        response = self.app.get('/')\n        self.assertEqual(200, response.status_code)\n        self.assertIn(b'Hello World!', response.data)\n\n\nif __name__ == '__main__':\n    unittest.main()\n```\n\n6. Run \"caos\" commands to manage dependencies and execute tasks, e.g.:\n\n   * **\"caos init\"** to create a virtual environment for the project.\n   * **\"caos update\"** to install project dependencies.\n   * **\"caos check\"** to check the right versions of the dependencies are installed.\n   * **\"caos run unittest\"** to run the custom step to execute unit tests.\n   * **\"caos run start\"** to run the custom step to start the Flask development server.\n   * **\"caos run test_and_start\"** to both test first and then start the Flask development server.\n\n![](https://raw.githubusercontent.com/caotic-co/caos/master/img/usage_example.gif)\n\n\n### Benefits:\n\n**Simplified Dependency Management:** Using \"caos\" and the \"caos.yml\" file streamlines the installation and tracking of project dependencies with semantic versioning.\n\n**Efficient Task Automation:** Custom tasks defined in \"caos.yml\" facilitate automation of common development tasks, enhancing productivity.\n\n**Improved Project Maintenance:** This setup ensures that the project remains organized, allowing for easier collaboration and maintenance.\n\n-----\n\n### For more detailed information about the commands available check the [Documentation](https://github.com/caotic-co/caos/blob/master/docs/README.md).\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A simple dependency management tool and tasks executor for Python projects",
    "version": "3.0.1",
    "project_urls": {
        "Homepage": "https://github.com/caotic-co/caos/"
    },
    "split_keywords": [
        "caos",
        "virtualenv",
        "dependencies",
        "manager",
        "poetry",
        "pip-tools",
        "npm",
        "pnpm",
        "bun",
        "maven",
        "composer",
        "pipenv",
        "venv",
        "easy_install",
        "setuptools",
        "wheel"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c5c816b27f645da2ed110c92a7a4b7bb1e4160088d22c2a35e6368139b08088c",
                "md5": "e0247c5f27fe5a8195b4a981feae9720",
                "sha256": "b8c564598100113c41d89db9f85c6fd51cdf74cac237e7e9dd520c14d54e620d"
            },
            "downloads": -1,
            "filename": "caos-3.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e0247c5f27fe5a8195b4a981feae9720",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 88973,
            "upload_time": "2023-10-10T06:23:51",
            "upload_time_iso_8601": "2023-10-10T06:23:51.983441Z",
            "url": "https://files.pythonhosted.org/packages/c5/c8/16b27f645da2ed110c92a7a4b7bb1e4160088d22c2a35e6368139b08088c/caos-3.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "defe56378624e294a74361a94198d6540c671413146ae1bc966592c6ac157bb2",
                "md5": "7e882401d31c54a1bc52b19869901d0b",
                "sha256": "bb540438539c74c78e7c6fde239d53bd5a9fd8cc4050da29af251e53d54a704c"
            },
            "downloads": -1,
            "filename": "caos-3.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "7e882401d31c54a1bc52b19869901d0b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 70052,
            "upload_time": "2023-10-10T06:23:53",
            "upload_time_iso_8601": "2023-10-10T06:23:53.352956Z",
            "url": "https://files.pythonhosted.org/packages/de/fe/56378624e294a74361a94198d6540c671413146ae1bc966592c6ac157bb2/caos-3.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-10 06:23:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "caotic-co",
    "github_project": "caos",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "caos"
}
        
Elapsed time: 0.16480s