Skip to main content

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_zone Zone ID can be found in cloudflare domain over view page (right bottom corner)
  • py_cf_dns_token generated 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.txt and requirements.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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cf_dns_xethhung12-0.0.2.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cf_dns_xethhung12-0.0.2-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file cf_dns_xethhung12-0.0.2.tar.gz.

File metadata

  • Download URL: cf_dns_xethhung12-0.0.2.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

Hashes for cf_dns_xethhung12-0.0.2.tar.gz
Algorithm Hash digest
SHA256 c9cf44693bbf0fd47c233b6e706de93525eb212f10790ffa945ed719421ebf03
MD5 b084ffcb72fe0f9d0f251a07beee3693
BLAKE2b-256 e0ada21dcd7d8b9b91c152a008529c6fe18dd1607e02fffcd834a9efda4a26f2

See more details on using hashes here.

File details

Details for the file cf_dns_xethhung12-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for cf_dns_xethhung12-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c8eb650b93781f13b3dfee2db86e0879dcfaa0052c76ac4f4faa3fb171cbc4a7
MD5 778995cdbf3630771186994b4826d171
BLAKE2b-256 9d6ada9d93166d678c76619de680b8fd0eeb92bbf19463b11dc755493b954900

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page