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
pip install dynapsys
Usage
Starting the Deployment Server
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:
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
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
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
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the Apache 2 License - see the LICENSE file for details.
Changelog
See CHANGELOG.md for a list of changes.
Todo
See TODO.md for planned features and improvements.
Metadata
Release files for dynapsys 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dynapsys-0.2.0.tar.gz | 20.4 kB | Without provenance | Details for dynapsys-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dynapsys-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for dynapsys-0.2.0-py3-none-any.whl |
Total release size: 33.8 kB
Release files / dynapsys-0.2.0.tar.gz
| Download URL | dynapsys-0.2.0.tar.gz |
|---|---|
| Size | 20.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9311f0033454e74b9f35e2162e6d0bd10f54133e43b760399d24bac38a32208e
|
|
BLAKE2b-256 checksum How to use checksums |
77b3a8f0b8b469f6f312b016316ea229630100447f61e23fb3bb2abb369a5851
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.3
|
Release files / dynapsys-0.2.0-py3-none-any.whl
| Download URL | dynapsys-0.2.0-py3-none-any.whl |
|---|---|
| Size | 13.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d2ca293294630bd5e8d398c8847e007a6c0884f365876d8deb77821c7e350f1f
|
|
BLAKE2b-256 checksum How to use checksums |
a35e3706df07fa6800978081821be95bcc68e247fd4cfefb2d2e1eee174ee045
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.3
|
Security for dynapsys 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.