{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/4"}],"enrichment":{"capability":"Forbiddenfruit allows you to dynamically add methods and attributes to Python's built-in types (like int, str, list) at runtime, using the CPython C API.","skillfed_tags":["metaprogramming","c-extension","testing-utilities"],"use_cases":["Implement fluent assertion APIs for testing libraries similar to RSpec Expectations.","Add introspection or profiling hooks to built-in types without modifying their source.","Temporarily extend built-in behavior within a specific code block using the context manager.","Spy on or intercept calls to built-in type methods for debugging or monitoring.","Prototype or experiment with language-like extensions to Python's core types."],"what_it_does":"Forbiddenfruit is a CPython-specific library that uses the Python C API to dynamically patch built-in types (int, str, list, etc.) with new methods and attributes at runtime. It was originally created to support fluent assertion libraries similar to RSpec Expectations, but has been used for spying, profiling integration, and other runtime introspection tasks.\n\nThe library provides three main functions: `curse()` to add a method to a built-in type, `reverse()` to remove a cursed attribute, and `cursed()` as a context manager or decorator to temporarily patch a type and automatically clean up on exit. Because it operates at the C API level, it can modify types that are normally immutable from pure Python. However, this power comes with significant constraints: it only works on CPython, requires compilation during installation, and the last release was in early 2021.","worth_installing":"Yes, if you need to dynamically extend built-in types and are committed to CPython. No, if you use PyPy or other implementations, or prefer to avoid C compilation during install. The dual MIT/GPLv3 license is permissive, but the high install friction and age of the last release mean you should verify compatibility with your specific Python version before relying on it in production."},"id":"forbiddenfruit","links":{"html":"https://skillfed.io/packages/forbiddenfruit","md":"https://skillfed.io/packages/forbiddenfruit.md","pypi":"https://pypi.org/project/forbiddenfruit/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2021-01-16","license_spdx":null,"license_treatment":"unclear","name":"forbiddenfruit","python_support":"unspecified","summary":"Patch python built-in objects"},"popularity":{"monthly_downloads":2451765,"position":3058,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"0.1.4"}
