{"library":"sorcery","title":"sorcery","type":"library","description":"A library of dark magic delights for Python, providing a set of utility decorators and context managers for cleaner code. Currently at version 0.2.2 (though effectively abandoned since 2020). No release cadence; last release May 2019.","language":"python","status":"abandoned","last_verified":"Sat May 09","install":{"commands":["pip install sorcery"],"cli":null},"imports":["from sorcery import call_from","from sorcery import delegate_to_instance","from sorcery import spell"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":null,"github":"https://github.com/alexmojaki/sorcery","docs":null,"changelog":null,"pypi":"https://pypi.org/project/sorcery/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"from sorcery import call_from, spell, delegate_to_instance\n\nclass Foo:\n    def __init__(self):\n        self.x = 10\n\n    @spell\n    def bar(self):\n        return call_from()  # returns (self, 'bar')\n\nfoo = Foo()\nassert foo.bar() == (foo, 'bar')\n\nprint('Quickstart works')","lang":"python","description":"Basic usage of call_from and spell decorator.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}