Name | dynapsys JSON |
Version |
0.2.0
JSON |
| download |
home_page | https://github.com/dynapsys/dynapsys |
Summary | Dynamic Python System Deployment Tools |
upload_time | 2024-11-19 23:43:32 |
maintainer | None |
docs_url | None |
author | Tom |
requires_python | >=3.6 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# DynaPsys
DynaPsys is a comprehensive Python package for automated deployment and management of web applications, with a focus on React applications. It provides tools for deployment automation, DNS management through Cloudflare, and process management using PM2.
## Features
- Automated deployment server for web applications
- Cloudflare DNS management integration
- Git repository support
- PM2 process management
- Base64 deployment support
- Comprehensive logging system
## Installation
```bash
pip install dynapsys
```
## Usage
### Starting the Deployment Server
```python
from dynapsys.deployment import run_server
# Start the server on port 8000 (default)
run_server()
# Or specify a custom port
run_server(port=8080)
```
### Deploying an Application
Send a POST request to the deployment server:
```bash
curl -X POST http://localhost:8000 \
-H "Content-Type: application/json" \
-d '{
"domain": "your-domain.com",
"cf_token": "your-cloudflare-token",
"source": "https://github.com/username/repo.git"
}'
```
### Using Individual Components
#### Git Operations
```python
from dynapsys.git import clone_git_repo, is_valid_git_url
# Validate Git URL
if is_valid_git_url("https://github.com/username/repo.git"):
# Clone repository
clone_git_repo("https://github.com/username/repo.git", "/path/to/target")
```
#### DNS Management
```python
from dynapsys.dns import update_cloudflare_dns
# Update DNS records
update_cloudflare_dns("your-domain.com", "your-cloudflare-token")
```
## Requirements
- Python 3.6+
- Git
- Node.js and npm (for React applications)
- PM2 (for process management)
- Cloudflare API token (for DNS management)
## Configuration
The package uses environment variables for configuration:
- `DYNAPSYS_LOG_LEVEL`: Logging level (default: DEBUG)
- `DYNAPSYS_LOG_FILE`: Path to log file (default: deployment.log)
- `DYNAPSYS_SITES_DIR`: Directory for deployed sites (default: /opt/reactjs/sites)
## Contributing
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request
## License
This project is licensed under the Apache 2 License - see the LICENSE file for details.
## Changelog
See [CHANGELOG.md](CHANGELOG.md) for a list of changes.
## Todo
See [TODO.md](TODO.md) for planned features and improvements.
Raw data
{
"_id": null,
"home_page": "https://github.com/dynapsys/dynapsys",
"name": "dynapsys",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "Tom",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/77/b3/a8f0b8b469f6f312b016316ea229630100447f61e23fb3bb2abb369a5851/dynapsys-0.2.0.tar.gz",
"platform": null,
"description": "# DynaPsys\n\nDynaPsys is a comprehensive Python package for automated deployment and management of web applications, with a focus on React applications. It provides tools for deployment automation, DNS management through Cloudflare, and process management using PM2.\n\n## Features\n\n- Automated deployment server for web applications\n- Cloudflare DNS management integration\n- Git repository support\n- PM2 process management\n- Base64 deployment support\n- Comprehensive logging system\n\n## Installation\n\n```bash\npip install dynapsys\n```\n\n## Usage\n\n### Starting the Deployment Server\n\n```python\nfrom dynapsys.deployment import run_server\n\n# Start the server on port 8000 (default)\nrun_server()\n\n# Or specify a custom port\nrun_server(port=8080)\n```\n\n### Deploying an Application\n\nSend a POST request to the deployment server:\n\n```bash\ncurl -X POST http://localhost:8000 \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"domain\": \"your-domain.com\",\n \"cf_token\": \"your-cloudflare-token\",\n \"source\": \"https://github.com/username/repo.git\"\n }'\n```\n\n### Using Individual Components\n\n#### Git Operations\n\n```python\nfrom dynapsys.git import clone_git_repo, is_valid_git_url\n\n# Validate Git URL\nif is_valid_git_url(\"https://github.com/username/repo.git\"):\n # Clone repository\n clone_git_repo(\"https://github.com/username/repo.git\", \"/path/to/target\")\n```\n\n#### DNS Management\n\n```python\nfrom dynapsys.dns import update_cloudflare_dns\n\n# Update DNS records\nupdate_cloudflare_dns(\"your-domain.com\", \"your-cloudflare-token\")\n```\n\n## Requirements\n\n- Python 3.6+\n- Git\n- Node.js and npm (for React applications)\n- PM2 (for process management)\n- Cloudflare API token (for DNS management)\n\n## Configuration\n\nThe package uses environment variables for configuration:\n\n- `DYNAPSYS_LOG_LEVEL`: Logging level (default: DEBUG)\n- `DYNAPSYS_LOG_FILE`: Path to log file (default: deployment.log)\n- `DYNAPSYS_SITES_DIR`: Directory for deployed sites (default: /opt/reactjs/sites)\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the Apache 2 License - see the LICENSE file for details.\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md) for a list of changes.\n\n## Todo\n\nSee [TODO.md](TODO.md) for planned features and improvements.\n",
"bugtrack_url": null,
"license": null,
"summary": "Dynamic Python System Deployment Tools",
"version": "0.2.0",
"project_urls": {
"Homepage": "https://github.com/dynapsys/dynapsys"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a35e3706df07fa6800978081821be95bcc68e247fd4cfefb2d2e1eee174ee045",
"md5": "d149631da0d3816856359f0dedcb972b",
"sha256": "d2ca293294630bd5e8d398c8847e007a6c0884f365876d8deb77821c7e350f1f"
},
"downloads": -1,
"filename": "dynapsys-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d149631da0d3816856359f0dedcb972b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 13305,
"upload_time": "2024-11-19T23:43:30",
"upload_time_iso_8601": "2024-11-19T23:43:30.461676Z",
"url": "https://files.pythonhosted.org/packages/a3/5e/3706df07fa6800978081821be95bcc68e247fd4cfefb2d2e1eee174ee045/dynapsys-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "77b3a8f0b8b469f6f312b016316ea229630100447f61e23fb3bb2abb369a5851",
"md5": "3b6f1f843d7259251abd81f93834a3f4",
"sha256": "9311f0033454e74b9f35e2162e6d0bd10f54133e43b760399d24bac38a32208e"
},
"downloads": -1,
"filename": "dynapsys-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "3b6f1f843d7259251abd81f93834a3f4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 20449,
"upload_time": "2024-11-19T23:43:32",
"upload_time_iso_8601": "2024-11-19T23:43:32.329801Z",
"url": "https://files.pythonhosted.org/packages/77/b3/a8f0b8b469f6f312b016316ea229630100447f61e23fb3bb2abb369a5851/dynapsys-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-19 23:43:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dynapsys",
"github_project": "dynapsys",
"github_not_found": true,
"lcname": "dynapsys"
}