Name | pystrano JSON |
Version |
1.1.1
JSON |
| download |
home_page | https://github.com/lexpank/pystrano |
Summary | A Python package for managing deploying Django applications (like Capistrano for Ruby) |
upload_time | 2025-01-13 07:35:58 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | MIT License Copyright (c) 2024 lexpank Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
pystrano
|
VCS |
 |
bugtrack_url |
|
requirements |
bcrypt
cffi
click
cryptography
decorator
deprecated
fabric
invoke
paramiko
pycparser
pynacl
python-dotenv
pyyaml
wrapt
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Pystrano
Pystrano is a simple deployment tool for Python projects.
It is inspired by Capistrano, a popular deployment tool for
Ruby projects.
## Disclaimer
This is a work in progress. It is not ready for production use
just yet. Proceed with caution. Currently used with Ubuntu
by yours truly. If someone finds it useful and wants to use it
in any capacity, don't hesitate.
## Installation
```bash
pip install pystrano
```
### Configuration
Pystrano uses a YAML file to configure the deployment. It contains two sections: `common` and `servers`. Variables in `common` section are shared across all servers, while in `servers` section you define a list of servers to deploy to. It is also possible to define server-specific variables, which will override the common ones (if defined).
Here is a description of variables you can set in the config file:
- `source_code_url`: The URL of the git repository;
- `project_root`: The directory where the project is located;
- `project_user`: The user that will be used to deploy the project;
- `venv_dir`: The directory where the virtual environment is located (in the `project_user` home);
- `keep_releases`: The number of releases to keep on the server. If set to 0 or less, all releases will be kept;
- `system_packages`: A list of system packages to install on the server (during setup);
- `env_file`: The path to the environment file to use for the deployment;
- `ssh_known_hosts`: The path to the known hosts file to use for the deployment (during setup; separated by semicolons);
- `service_file`: The path to the service file to set up/use in deployment (optional);
- `secrets`: List of secrets to set up on the server (during setup only for now; separated by semicolons);
- `branch`: The name of the branch to deploy.
Server-specific variables:
- `host`: The hostname of the server;
- `port`: The port to use for SSH connection (optional, default is 22);
- `run_migrations`: Whether to run migrations on deployment (optional, default is false);
- `run_collectstatic`: Whether to run collectstatic on deployment (optional, default is false);
Default directory structure for the configs is as follows:
```commandline
deploy/
app_name/
environment_name/
deployment.yml
```
## Usage
Pystrano is a command line tool. To deploy a project, you need
to create a config for the environment you want to deploy to.
General syntax for usage is as follows:
```bash
pystrano <command> <environment> <project>
```
Available commands are:
- `setup`: Set up the server for deployment;
- `deploy`: Deploy the project to the server.
Optional arguments:
- `--deploy-config-dir`: The directory where the deployment configs are located (default is `deploy`);
- `--config-file-name`: The name of the config file to use (default is `deployment.yml`);
### Example usage
To set up deployment for a project, run the following command:
```bash
pystrano setup production api
```
This will set up your production server to be ready for deployment.
To deploy your project, run the following command:
```bash
pystrano deploy production api
```
Raw data
{
"_id": null,
"home_page": "https://github.com/lexpank/pystrano",
"name": "pystrano",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "pystrano",
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/a5/a2/14f1b183ffcb2386026cee13bcd65445461c9507d49af636c7e59ccfd3e8/pystrano-1.1.1.tar.gz",
"platform": null,
"description": "# Pystrano\n\nPystrano is a simple deployment tool for Python projects.\nIt is inspired by Capistrano, a popular deployment tool for\nRuby projects.\n\n## Disclaimer\n\nThis is a work in progress. It is not ready for production use\njust yet. Proceed with caution. Currently used with Ubuntu\nby yours truly. If someone finds it useful and wants to use it\nin any capacity, don't hesitate.\n\n## Installation\n\n```bash\npip install pystrano\n```\n\n### Configuration\n\nPystrano uses a YAML file to configure the deployment. It contains two sections: `common` and `servers`. Variables in `common` section are shared across all servers, while in `servers` section you define a list of servers to deploy to. It is also possible to define server-specific variables, which will override the common ones (if defined).\n\nHere is a description of variables you can set in the config file:\n\n- `source_code_url`: The URL of the git repository;\n- `project_root`: The directory where the project is located;\n- `project_user`: The user that will be used to deploy the project;\n- `venv_dir`: The directory where the virtual environment is located (in the `project_user` home);\n- `keep_releases`: The number of releases to keep on the server. If set to 0 or less, all releases will be kept;\n- `system_packages`: A list of system packages to install on the server (during setup);\n- `env_file`: The path to the environment file to use for the deployment;\n- `ssh_known_hosts`: The path to the known hosts file to use for the deployment (during setup; separated by semicolons);\n- `service_file`: The path to the service file to set up/use in deployment (optional);\n- `secrets`: List of secrets to set up on the server (during setup only for now; separated by semicolons);\n- `branch`: The name of the branch to deploy.\n\nServer-specific variables:\n\n- `host`: The hostname of the server;\n- `port`: The port to use for SSH connection (optional, default is 22);\n- `run_migrations`: Whether to run migrations on deployment (optional, default is false);\n- `run_collectstatic`: Whether to run collectstatic on deployment (optional, default is false);\n\nDefault directory structure for the configs is as follows:\n\n```commandline\ndeploy/\n app_name/\n environment_name/\n deployment.yml\n```\n\n## Usage\n\nPystrano is a command line tool. To deploy a project, you need\nto create a config for the environment you want to deploy to.\nGeneral syntax for usage is as follows:\n\n```bash\npystrano <command> <environment> <project>\n```\n\nAvailable commands are:\n\n- `setup`: Set up the server for deployment;\n- `deploy`: Deploy the project to the server.\n\nOptional arguments:\n\n- `--deploy-config-dir`: The directory where the deployment configs are located (default is `deploy`);\n- `--config-file-name`: The name of the config file to use (default is `deployment.yml`);\n\n### Example usage\n\nTo set up deployment for a project, run the following command:\n\n```bash\npystrano setup production api\n```\n\nThis will set up your production server to be ready for deployment.\n\nTo deploy your project, run the following command:\n\n```bash\npystrano deploy production api\n```\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 lexpank Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "A Python package for managing deploying Django applications (like Capistrano for Ruby)",
"version": "1.1.1",
"project_urls": {
"Homepage": "https://github.com/lexpank/pystrano",
"issues": "https://github.com/lexpank/pystrano/issues"
},
"split_keywords": [
"pystrano"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c0ea4fa43c0930390f07423f5325cf03c7991c4f47b96d5bcdc414f2f7d332f2",
"md5": "fe82a275be50b32d52ae38abfe86bfa0",
"sha256": "b0287bc9a6deebcda5da1287e83dd77d6be2a9ab5f82e9dc1c478681df020fc3"
},
"downloads": -1,
"filename": "pystrano-1.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fe82a275be50b32d52ae38abfe86bfa0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 8659,
"upload_time": "2025-01-13T07:35:56",
"upload_time_iso_8601": "2025-01-13T07:35:56.335098Z",
"url": "https://files.pythonhosted.org/packages/c0/ea/4fa43c0930390f07423f5325cf03c7991c4f47b96d5bcdc414f2f7d332f2/pystrano-1.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a5a214f1b183ffcb2386026cee13bcd65445461c9507d49af636c7e59ccfd3e8",
"md5": "212fea05aad1ca47b9c9afc444c2fe0c",
"sha256": "872888cc66768d29d9f0b36acff672d6899efa3b31365b913180d28312eb4d7c"
},
"downloads": -1,
"filename": "pystrano-1.1.1.tar.gz",
"has_sig": false,
"md5_digest": "212fea05aad1ca47b9c9afc444c2fe0c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 9498,
"upload_time": "2025-01-13T07:35:58",
"upload_time_iso_8601": "2025-01-13T07:35:58.412840Z",
"url": "https://files.pythonhosted.org/packages/a5/a2/14f1b183ffcb2386026cee13bcd65445461c9507d49af636c7e59ccfd3e8/pystrano-1.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-13 07:35:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "lexpank",
"github_project": "pystrano",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "bcrypt",
"specs": [
[
"==",
"4.2.1"
]
]
},
{
"name": "cffi",
"specs": [
[
"==",
"1.17.1"
]
]
},
{
"name": "click",
"specs": [
[
"==",
"8.1.8"
]
]
},
{
"name": "cryptography",
"specs": [
[
"==",
"44.0.0"
]
]
},
{
"name": "decorator",
"specs": [
[
"==",
"5.1.1"
]
]
},
{
"name": "deprecated",
"specs": [
[
"==",
"1.2.15"
]
]
},
{
"name": "fabric",
"specs": [
[
"==",
"3.2.2"
]
]
},
{
"name": "invoke",
"specs": [
[
"==",
"2.2.0"
]
]
},
{
"name": "paramiko",
"specs": [
[
"==",
"3.5.0"
]
]
},
{
"name": "pycparser",
"specs": [
[
"==",
"2.22"
]
]
},
{
"name": "pynacl",
"specs": [
[
"==",
"1.5.0"
]
]
},
{
"name": "python-dotenv",
"specs": [
[
"==",
"1.0.1"
]
]
},
{
"name": "pyyaml",
"specs": [
[
"==",
"6.0.2"
]
]
},
{
"name": "wrapt",
"specs": [
[
"==",
"1.17.0"
]
]
}
],
"lcname": "pystrano"
}