Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

DNS Mock

CodeQL codecov Python package

Python DNS Mock to bypass current DNS resolution. Emulates /etc/hosts inside a container.

Requirements

The dnsmock segment requires the standard library module socket. It provides access to the BSD socket interface.

Installation

Using pip

pip install dnsmock

Usage example

import dnsmock
import requests

dnsmock.bind_ip('www.example.com', 443, '127.0.0.1')
response = requests.get('https://www.example.com', verify=True)

print(response.text)

Authors

Originally created by @imjoseangel

License

Licensed under the MIT License.

Metadata

Release files for dnsmock 21.2b2

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

Source distribution (sdist)

Source distribution for dnsmock 21.2b2
File Size Uploaded Provenance Actions
dnsmock-21.2b2.tar.gz 16.8 kB Without provenance Details for dnsmock-21.2b2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dnsmock 21.2b2
File Interpreter ABI Platform Actions
dnsmock-21.2b2-py2.py3-none-any.whl Python 2, Python 3 none any Details for dnsmock-21.2b2-py2.py3-none-any.whl

Total release size: 22.3 kB

Release files / dnsmock-21.2b2.tar.gz

Download URL dnsmock-21.2b2.tar.gz
Size 16.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e590b2322690b14fc8f2eb0e0f1ec655828554f8254ed71c8f4ee07e2be04359
BLAKE2b-256 checksum
How to use checksums
8ea8e5179563bc971f17d144c72500bc65f5a206cd0ba54c92961d09bdb0df22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Release files / dnsmock-21.2b2-py2.py3-none-any.whl

Download URL dnsmock-21.2b2-py2.py3-none-any.whl
Size 5.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
df94f69840ad9b7db9a22e069d3a4db8fe57b022b02f779e4d3682738dbb7e19
BLAKE2b-256 checksum
How to use checksums
db7d59207986ec950aeefd05bca61a0d275aa56add6949fdbd0cba8832f18285
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Security for dnsmock 21.2b2

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.

Release history Release notifications | RSS feed

This release
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