A small package targeting to help on python project packaging process
Project description
cf_dns_xethhung12
Execution
The program requires two environment variables,
py_cf_dns_zoneZone ID can be found in cloudflare domain over view page (right bottom corner)py_cf_dns_tokengenerated in cloudflare profile > API Token page, the token require Zone:ZOne:read and Zone:DNS:read permission to the selected zone Run through python interpreter:
Help command
python -m cf_dns_xethhung12 -h
Load cloudflare DNS records to tf file and then import the resource into tf state
# make sure the two environment variable is set
cf-dns-xethhung12 cf-dns as-tf > dns.tf
cf-dns-xethhung12 cf-dns import-tf -f dns.tf # check the script generated and execute it carefully
## result should be similar to below
# .
# .
# .
# tofu import cloudflare_record.{resource name} {zone id}/{resource id in cloudflare}
# tofu import cloudflare_record.{resource name} {zone id}/{resource id in cloudflare}
# tofu import cloudflare_record.{resource name} {zone id}/{resource id in cloudflare}
# .
# .
# .
Run through python project script
cf-dns-xethhung12 -h
Development
The project requires python (3+ version) installed and pip ready for use on adding manage dependencies
Tools
| Name | Platform | Type | Description |
|---|---|---|---|
| install-dependencies.sh | shell | script | The scripts for installing depencies required |
| build.sh | shell | script | The scripts for build the package |
| build-and-deploy.sh | shell | script | The scripts for build and deploy the package |
- install-dependencies.sh
The script will install dependencies listed in
dev-requirements.txtandrequirements.txt. The first requirement file contains the dependencies for development like build and deploy tools. The second requirement file defined all required dependencies for the making the package works (actual dependencies).
Useful Scripts
Project Versioning
For version update in pyproject.toml.
This project use package xh-py-project-versioning to manipulate the project version.
Simple usage includes:
Base on current version, update the patch number with dev id
python -m xh_py_project_versioning --patch
In case current version is 0.0.1, the updated version will be 0.0.2-dev+000
To prompt the dev version to official version use command.
python -m xh_py_project_versioning -r.
Through the command, version 0.0.2-dev+000 will be prompt to 0.0.2 official versioning.
Base on current version, update the patch number directly
python -m xh_py_project_versioning --patch -d
In case current version is 0.0.1, the updated version will be 0.0.2
Base on current version, update the minor number directly
python -m xh_py_project_versioning --minor -d
In case current version is 0.0.1, the updated version will be 0.1.0
Base on current version, update the minor number directly
python -m xh_py_project_versioning --minor -d
In case current version is 0.0.1, the updated version will be 1.0.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cf_dns_xethhung12-0.0.1.tar.gz.
File metadata
- Download URL: cf_dns_xethhung12-0.0.1.tar.gz
- Upload date:
- Size: 16.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77e5837979d9183ed0a9cdd1a3f248812573a6ba573f9b2e4ab018edf93bbd89
|
|
| MD5 |
3e56a9b6d1117ea9c569666ed4eb6530
|
|
| BLAKE2b-256 |
37f8ea3f7c438d9d45cf846681c5d4a5613a7f08eb8484c48eeef6ddf04a374c
|
File details
Details for the file cf_dns_xethhung12-0.0.1-py3-none-any.whl.
File metadata
- Download URL: cf_dns_xethhung12-0.0.1-py3-none-any.whl
- Upload date:
- Size: 17.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa96e167094cd0b45b4e4eb9770b785563ab728f861e24cbb2c5a1533781a6ee
|
|
| MD5 |
49e96370779e42c5cd88d7e43662e0b4
|
|
| BLAKE2b-256 |
6e394cc2754c8f26b49a5c84437cdd66189372487b5f26d67230e3b114e31db1
|