git-tag-deploy


Namegit-tag-deploy JSON
Version 0.2.0 PyPI version JSON
download
home_pageNone
SummaryDev tool to deploy git-tagged versions of a FastAPI app
upload_time2025-08-27 08:05:40
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
keywords fastapi deployment git automation cli
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Git Tag Deploy

[![Python Version](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/)
[![PyPI version](https://img.shields.io/pypi/v/git-tag-deploy.svg)](https://pypi.org/project/git-tag-deploy/)
[![FastAPI](https://img.shields.io/badge/FastAPI-0.100+-009688?logo=fastapi)](https://fastapi.tiangolo.com/)
[![Pre-commit Hooks](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://pre-commit.com/)
[![Code Style: Black](https://img.shields.io/badge/code%20style-black-black.svg)](https://github.com/psf/black)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)

A lightweight **developer tool** to deploy multiple Git-tagged versions of a FastAPI application simultaneously, each on its own dynamically assigned port. Includes a simple FastAPI endpoint to view all active deployments.

---

## Features

- Deploy any number of Git tags from your repository.
- Automatically assigns free ports in the range `8001-9000`.
- Each deployment runs in its own daemon process — terminates automatically when the main starter process exits.
- Provides a `/deployments` FastAPI endpoint to check which versions are running and on which ports.
- Simple CLI for one-command deployment.

---

## Installation

Install via pip using the pypi package:

```bash
pip install git-tag-deploy
````

This installs the package and registers the `git-tag-deploy` CLI.

---

## Usage

1. Ensure you have a `deployment.yaml` file in your repository, listing the apps and Git tags to deploy.
2. Run the CLI:

```bash
git-tag-deploy
```

The CLI will:

* Deploy all Git-tagged apps to dynamically assigned ports.
* Print the deployed apps and ports in the console.
* Start a FastAPI server on port `5000` to expose `/deployments`.

Example console output:

```
Starting deployments...

Deployments started:
 - service1: tag=v1.0.0, port=8001
 - service2: tag=v1.1.0, port=8002

FastAPI status server running at http://127.0.0.1:5000/deployments
```

Visit [http://127.0.0.1:5000/deployments](http://127.0.0.1:5000/deployments) to see JSON information of all active deployments.

---

## Project Structure

```
tenbatsu24-git-tag-deployment/
├── pyproject.toml        # Project configuration and dependencies
└── git_tag_deploy/       # Main package
    ├── __init__.py
    ├── cli.py            # CLI entry point
    ├── deployer.py       # Deployment logic and process management
    └── server.py         # FastAPI endpoint for deployment info
```

---

## Dependencies

* Python 3.10+
* [PyYAML](https://pyyaml.org/) – for reading deployment configuration
* [FastAPI](https://fastapi.tiangolo.com/) – for the status server
* [uvicorn](https://www.uvicorn.org/) – ASGI server for deployed apps

---

## How It Works

* Reads the `deployment.yaml` file to determine which Git tags to deploy.
* Clones the repository for each tag into a temporary directory.
* Starts each deployment in a **daemonized process**, running uvicorn on a free port.
* Tracks deployments in memory (`tag` + `port`) for the FastAPI `/deployments` endpoint.

---

## Future Improvements
* [ ] Implement logging for deployment processes.
* [ ] Add health checks for deployed applications.
* [ ] Clean up temporary directories after deployments.
* [ ] Custom deployment scripts/hooks. (not just uvicorn app.main:app)
* [ ] Docker support for containerized deployments of git tags.

## License

This project is licensed under the Apache-2.0 License. See the [LICENSE](LICENSE) file for details.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "git-tag-deploy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "fastapi, deployment, git, automation, cli",
    "author": null,
    "author_email": "Tenbatsu24 <puruvaish24@outlook.com>",
    "download_url": "https://files.pythonhosted.org/packages/07/50/b3aa1132ae2ea7077c54cbd8af7ad1626a7819f5408c64d1bae06af2d0d9/git_tag_deploy-0.2.0.tar.gz",
    "platform": null,
    "description": "# Git Tag Deploy\n\n[![Python Version](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/)\n[![PyPI version](https://img.shields.io/pypi/v/git-tag-deploy.svg)](https://pypi.org/project/git-tag-deploy/)\n[![FastAPI](https://img.shields.io/badge/FastAPI-0.100+-009688?logo=fastapi)](https://fastapi.tiangolo.com/)\n[![Pre-commit Hooks](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://pre-commit.com/)\n[![Code Style: Black](https://img.shields.io/badge/code%20style-black-black.svg)](https://github.com/psf/black)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)\n\nA lightweight **developer tool** to deploy multiple Git-tagged versions of a FastAPI application simultaneously, each on its own dynamically assigned port. Includes a simple FastAPI endpoint to view all active deployments.\n\n---\n\n## Features\n\n- Deploy any number of Git tags from your repository.\n- Automatically assigns free ports in the range `8001-9000`.\n- Each deployment runs in its own daemon process \u2014 terminates automatically when the main starter process exits.\n- Provides a `/deployments` FastAPI endpoint to check which versions are running and on which ports.\n- Simple CLI for one-command deployment.\n\n---\n\n## Installation\n\nInstall via pip using the pypi package:\n\n```bash\npip install git-tag-deploy\n````\n\nThis installs the package and registers the `git-tag-deploy` CLI.\n\n---\n\n## Usage\n\n1. Ensure you have a `deployment.yaml` file in your repository, listing the apps and Git tags to deploy.\n2. Run the CLI:\n\n```bash\ngit-tag-deploy\n```\n\nThe CLI will:\n\n* Deploy all Git-tagged apps to dynamically assigned ports.\n* Print the deployed apps and ports in the console.\n* Start a FastAPI server on port `5000` to expose `/deployments`.\n\nExample console output:\n\n```\nStarting deployments...\n\nDeployments started:\n - service1: tag=v1.0.0, port=8001\n - service2: tag=v1.1.0, port=8002\n\nFastAPI status server running at http://127.0.0.1:5000/deployments\n```\n\nVisit [http://127.0.0.1:5000/deployments](http://127.0.0.1:5000/deployments) to see JSON information of all active deployments.\n\n---\n\n## Project Structure\n\n```\ntenbatsu24-git-tag-deployment/\n\u251c\u2500\u2500 pyproject.toml        # Project configuration and dependencies\n\u2514\u2500\u2500 git_tag_deploy/       # Main package\n    \u251c\u2500\u2500 __init__.py\n    \u251c\u2500\u2500 cli.py            # CLI entry point\n    \u251c\u2500\u2500 deployer.py       # Deployment logic and process management\n    \u2514\u2500\u2500 server.py         # FastAPI endpoint for deployment info\n```\n\n---\n\n## Dependencies\n\n* Python 3.10+\n* [PyYAML](https://pyyaml.org/) \u2013 for reading deployment configuration\n* [FastAPI](https://fastapi.tiangolo.com/) \u2013 for the status server\n* [uvicorn](https://www.uvicorn.org/) \u2013 ASGI server for deployed apps\n\n---\n\n## How It Works\n\n* Reads the `deployment.yaml` file to determine which Git tags to deploy.\n* Clones the repository for each tag into a temporary directory.\n* Starts each deployment in a **daemonized process**, running uvicorn on a free port.\n* Tracks deployments in memory (`tag` + `port`) for the FastAPI `/deployments` endpoint.\n\n---\n\n## Future Improvements\n* [ ] Implement logging for deployment processes.\n* [ ] Add health checks for deployed applications.\n* [ ] Clean up temporary directories after deployments.\n* [ ] Custom deployment scripts/hooks. (not just uvicorn app.main:app)\n* [ ] Docker support for containerized deployments of git tags.\n\n## License\n\nThis project is licensed under the Apache-2.0 License. See the [LICENSE](LICENSE) file for details.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Dev tool to deploy git-tagged versions of a FastAPI app",
    "version": "0.2.0",
    "project_urls": null,
    "split_keywords": [
        "fastapi",
        " deployment",
        " git",
        " automation",
        " cli"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b796e7ee2edbe686014c1c635bcaff428807c2d0f6103cca9ec443680df96a21",
                "md5": "f45f6bb8475b4ca9b4834ee2b5d3db27",
                "sha256": "1a68392b44d2bd9544b1c873ebb4743fbeaeaa8d9f1b8d5dfa2a33e00066148e"
            },
            "downloads": -1,
            "filename": "git_tag_deploy-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f45f6bb8475b4ca9b4834ee2b5d3db27",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 9502,
            "upload_time": "2025-08-27T08:05:39",
            "upload_time_iso_8601": "2025-08-27T08:05:39.864489Z",
            "url": "https://files.pythonhosted.org/packages/b7/96/e7ee2edbe686014c1c635bcaff428807c2d0f6103cca9ec443680df96a21/git_tag_deploy-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "0750b3aa1132ae2ea7077c54cbd8af7ad1626a7819f5408c64d1bae06af2d0d9",
                "md5": "216894177a8e43537a032b3dfe7cad9d",
                "sha256": "0af5de9bace58c7ed4ad26ed33ba25f2f560ad8a025026b843cfb49b29615234"
            },
            "downloads": -1,
            "filename": "git_tag_deploy-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "216894177a8e43537a032b3dfe7cad9d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 8866,
            "upload_time": "2025-08-27T08:05:40",
            "upload_time_iso_8601": "2025-08-27T08:05:40.853239Z",
            "url": "https://files.pythonhosted.org/packages/07/50/b3aa1132ae2ea7077c54cbd8af7ad1626a7819f5408c64d1bae06af2d0d9/git_tag_deploy-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-27 08:05:40",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "git-tag-deploy"
}
        
Elapsed time: 1.77610s