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.1.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.1-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

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

Hashes for cf_dns_xethhung12-0.0.1.tar.gz
Algorithm Hash digest
SHA256 77e5837979d9183ed0a9cdd1a3f248812573a6ba573f9b2e4ab018edf93bbd89
MD5 3e56a9b6d1117ea9c569666ed4eb6530
BLAKE2b-256 37f8ea3f7c438d9d45cf846681c5d4a5613a7f08eb8484c48eeef6ddf04a374c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cf_dns_xethhung12-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fa96e167094cd0b45b4e4eb9770b785563ab728f861e24cbb2c5a1533781a6ee
MD5 49e96370779e42c5cd88d7e43662e0b4
BLAKE2b-256 6e394cc2754c8f26b49a5c84437cdd66189372487b5f26d67230e3b114e31db1

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