{"id":10095,"library":"pyfunceble-dev","title":"PyFunceble Development","description":"PyFunceble is a Python library and CLI tool designed to check the availability or syntax of domains, IP addresses, and URLs. It's actively maintained with frequent releases, currently at version 4.4.1, offering robust tools for network hygiene and security analysis. The 'dev' package suffix often indicates the latest development branch.","status":"active","version":"4.4.1","language":"en","source_language":"en","source_url":"https://github.com/funilrys/PyFunceble/tree/dev","tags":["domain","ip","url","availability","security","network","cli"],"install":[{"cmd":"pip install pyfunceble-dev","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Used for internal database management and persistence.","package":"SQLAlchemy","optional":false},{"reason":"Required for secure operations; minimum version updates often address vulnerabilities.","package":"cryptography","optional":false}],"imports":[{"note":"The primary programmatic entry point is the PyFunceble class itself, not the package as a whole.","wrong":"import pyfunceble","symbol":"PyFunceble","correct":"from PyFunceble import PyFunceble"},{"note":"For more advanced control or integration with PyFunceble's core engine logic.","symbol":"Engine","correct":"from PyFunceble import Engine"}],"quickstart":{"code":"import tempfile\nimport shutil\nfrom PyFunceble import PyFunceble\n\n# Create a temporary directory for PyFunceble's output (logs, databases)\noutput_dir = tempfile.mkdtemp()\n\ntry:\n    print(f\"PyFunceble output will be stored in: {output_dir}\")\n\n    # Initialize PyFunceble. Pass output_dir to control where files are created.\n    # For a fully quiet operation, you can configure logging separately.\n    funceble = PyFunceble(output_dir=output_dir, \n                          log_level='CRITICAL', \n                          autodisconnect=True)\n\n    # Test a single domain\n    domain_to_test = \"google.com\"\n    print(f\"\\nTesting '{domain_to_test}'...\")\n    results = funceble.test_single(domain_to_test)\n    print(f\"Results for {domain_to_test}: Status = {results.get('status', 'N/A')}, \")\n    print(f\"  Expiration = {results.get('expiration_date', 'N/A')}, \")\n    print(f\"  HTTP Status = {results.get('http_status_code', 'N/A')}\")\n\n    # Test a known non-existent domain (for demonstration)\n    non_existent_domain = \"thisdomainreallyshouldntexist.xyz\"\n    print(f\"\\nTesting '{non_existent_domain}'...\")\n    results_non_existent = funceble.test_single(non_existent_domain)\n    print(f\"Results for {non_existent_domain}: Status = {results_non_existent.get('status', 'N/A')}\")\n\nfinally:\n    # Clean up the temporary directory after use\n    print(f\"\\nCleaning up temporary output directory: {output_dir}\")\n    shutil.rmtree(output_dir)\n","lang":"python","description":"This quickstart demonstrates how to programmatically use PyFunceble to check the status of domains. It initializes the PyFunceble engine, tests a single domain, and prints key results. A temporary directory is used for output files to keep your system clean, and logging is suppressed for a concise output."},"warnings":[{"fix":"Review the official PyFunceble v4 documentation and migration guides. Update any code interacting directly with PyFunceble's internal structures or previously deprecated APIs.","message":"Version 4.0.0 introduced a significant rewrite of the internal data work and a reinforcement of the Python module. Users upgrading from the 3.x series should expect breaking changes, especially if relying on deep internal interactions.","severity":"breaking","affected_versions":">=4.0.0 (from 3.x)"},{"fix":"Upgrade to PyFunceble v4.3.0 or newer. Ensure your database configuration is correct and accessible.","message":"Prior to v4.3.0, there were issues using MariaDB or PostgreSQL databases in 'single mode' (without a file-based input). This could lead to errors or unexpected behavior when trying to persist or retrieve data.","severity":"gotcha","affected_versions":"<4.3.0"},{"fix":"Consult the PyFunceble GitHub repository for changes related to SQLAlchemy 2.0 interaction. Ensure your code aligns with the updated declarative mapping patterns if you're extending PyFunceble's ORM.","message":"Developers interacting with PyFunceble's database layer should be aware that the way PyFunceble works and interacts with SQLAlchemy 2.0 Declarative Mapping was improved in v4.3.1. This might affect custom integrations or extensions.","severity":"gotcha","affected_versions":">=4.3.1"},{"fix":"Upgrade to PyFunceble v4.2.27 or newer to benefit from improved stability and accuracy in HTTP status code checks.","message":"Earlier versions (prior to v4.2.27) experienced unstable results when testing against HTTP status codes, leading to potentially inaccurate availability assessments.","severity":"gotcha","affected_versions":"<4.2.27"}],"env_vars":null,"last_verified":"2026-04-17T00:00:00.000Z","next_check":"2026-07-16T00:00:00.000Z","problems":[{"fix":"Run `pip install pyfunceble-dev` to install the package. If using a virtual environment, ensure it's activated.","cause":"The pyfunceble-dev package is not installed in your current Python environment, or the environment is not active.","error":"ModuleNotFoundError: No module named 'PyFunceble'"},{"fix":"Remove the `config_file` argument from the PyFunceble constructor. Instead, pass configuration options directly as keyword arguments (e.g., `PyFunceble(output_dir='...', log_level='...')`) or manage configuration via `PyFunceble.configure()`.","cause":"In PyFunceble v4.x, the 'config_file' parameter for initialization has been removed. Configuration is now primarily handled through constructor arguments or the internal configuration module.","error":"TypeError: PyFunceble.__init__() got an unexpected keyword argument 'config_file'"},{"fix":"Check your system's network connectivity and DNS server configuration. Ensure ports 53 (UDP/TCP) are not blocked. PyFunceble v4.2.0 and above provide default Quad9 DNS servers if none are found, so upgrading may help in some cases.","cause":"PyFunceble could not reach any configured or default DNS servers. This can be due to network issues, misconfigured DNS settings on the system, or firewalls blocking DNS traffic.","error":"PyFunceble.exceptions.ConnectionError: The following DNS server(s) failed to respond: [...]"}]}