{"id":21211,"library":"empty-files","title":"EmptyFiles","description":"Provides empty (placeholder) files in many formats (images, documents, archives, etc.) for testing and development. Current version 0.0.9, active development on GitHub.","status":"active","version":"0.0.9","language":"python","source_language":"en","source_url":"https://github.com/approvals/EmptyFiles.Python","tags":["test-data","placeholders","empty-files","testing"],"install":[{"cmd":"pip install empty-files","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"Used internally for OpenSSL handling; may cause startup errors on Python 3.7","package":"urllib3","optional":false}],"imports":[{"note":"The module and function share the same name; use the explicit from import.","wrong":"import empty_files","symbol":"empty_files","correct":"from empty_files import empty_files"},{"note":null,"wrong":null,"symbol":"AllEmptyFiles","correct":"from empty_files import AllEmptyFiles"}],"quickstart":{"code":"from empty_files import empty_files\n\n# Get empty PNG file content (bytes)\npng_bytes = empty_files('png')\nprint(f'Got {len(png_bytes)} bytes of empty PNG')\n\n# Get all supported extensions\nfrom empty_files import AllEmptyFiles\nextensions = list(AllEmptyFiles().ALL_FILES.keys())\nprint(extensions[:5])","lang":"python","description":"Fetch empty file bytes for any supported extension. See AllEmptyFiles().ALL_FILES for full list."},"warnings":[{"fix":"Upgrade Python to 3.8+ or set SSL_CERT_FILE environment variable. Alternatively, check returned bytes length.","message":"On Python 3.7, if OpenSSL is not configured correctly for urllib3, the library silently falls back to writing 0-byte files instead of proper placeholders. Always verify the content length > 0 if using placeholder integrity.","severity":"gotcha","affected_versions":"<=0.0.9"},{"fix":"Use `from empty_files import empty_files` and then call `empty_files('pdf')`.","message":"The function name `empty_files` is also the module name. If you do `import empty_files`, you must call `empty_files.empty_files()` or alias it. Many new users forget the module prefix.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade to Python 3.7+.","message":"Python 3.6 support was dropped in v0.0.4. Installing on 3.6 will get an older, unmaintained version.","severity":"deprecated","affected_versions":">=0.0.4"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use `from empty_files import empty_files` and then `empty_files('png')`.","cause":"Using `import empty_files` then trying `empty_files('png')` without qualifying the module.","error":"AttributeError: module 'empty_files' has no attribute 'empty_files'"},{"fix":"Set environment variable SSL_CERT_FILE to a valid CA bundle, or upgrade Python to 3.8+.","cause":"The library attempts to fetch placeholder definitions from a remote URL (GitHub). On Python 3.7 with misconfigured OpenSSL, this fails and falls back to zero-byte files.","error":"requests.exceptions.SSLError: HTTPSConnectionPool(host='...', port=443): Max retries exceeded with url: /... (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed')))"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}