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.1.0.tar.gz (16.9 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.1.0-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cf_dns_xethhung12-0.1.0.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for cf_dns_xethhung12-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c01c20572aaa9bfa749058645bbc462996d4aa3dc88252812a1c804eb51a74b6
MD5 e5b65abca949253dddb2a457596161bb
BLAKE2b-256 8e9e82626ce206e34bcfae85bd9fea3bec6470f5a3847801b9fe4a0eec5f311c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cf_dns_xethhung12-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d57de8b026555a14d68743ed7570fc57e802dc6bc7403d6629d3e1969ee1290f
MD5 a8e8503fbd29ed0afdfb8bb15437e8fd
BLAKE2b-256 b029090ad04de41f80b8e9787b44d62dea04bd320023f7ce526973d77d3f2513

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