Skip to main content

Local CNAME

Latest Version Development Status Python Versions License

This is a little helper script to emulate a local CNAME DNS by writing to /etc/hosts. DNS changes (e.g. to rollout new services) can be tested by overwriting DNS names in the local /etc/hosts file. The hosts file only supports IP addresses thus making it cumbersome to emulate a DNS CNAME without a local DNS server/proxy. The local-cname is a very small script to automatically lookup DNS names and write IP addresses to the hosts file. It is self-contained and restores your local /etc/hosts file on exit (press CTRL+C).

Installation:

$ sudo pip install -U local-cname

Usage:

$ sudo local-cname FROM_DNS_NAME TO_DNS_NAME
  # press CTRL+C to cancel and restore your old /etc/hosts

Example:

$ sudo local-cname google.com duckduckgo.com
$ ping google.com

Metadata

Release files for local-cname 0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for local-cname 0.3
File Size Uploaded Provenance
local-cname-0.3.tar.gz 2.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for local-cname 0.3
File Interpreter ABI Platform
local_cname-0.3-py3-none-any.whl Python 3 none any Details

Total release size: 7.3 kB

Release files / local-cname-0.3.tar.gz

Download URL local-cname-0.3.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0789088fe2c911efbe1eee111cb8d3d9a6688721527a283f53f419cbee83542b
BLAKE2b-256 checksum
How to use checksums
12fd6b95df27018d3356368fc93a1bf9ee494e144adac39a5429740e9d5dbd2e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / local_cname-0.3-py3-none-any.whl

Download URL local_cname-0.3-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c74b11dc1d8dace355297e0842e0206e1b8bdee1fb2675173176958a563769c4
BLAKE2b-256 checksum
How to use checksums
7e41b75cfea5f98dadafc3237dc9040cd57fa2239289424cf2bb94102fe78aad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for local-cname 0.3

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page