
Product
Introducing Socket MCP for Claude Desktop
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.
A simple python decorator for defining properties that only run their fget function once
.. image:: https://badge.fury.io/py/memoized-property.png :target: http://badge.fury.io/py/memoized-property
.. image:: https://travis-ci.org/estebistec/python-memoized-property.png?branch=master :target: https://travis-ci.org/estebistec/python-memoized-property
.. image:: https://pypip.in/d/memoized-property/badge.png :target: https://crate.io/packages/memoized-property?version=latest
A simple python decorator for defining properties that only run their fget function once.
A Python property that only calls its fget
function one time. How many times have you written
this code (or similar)?
::
def class C(object):
@property
def name(self):
if not hasattr(self, '_name'):
self._name = some_expensive_load()
return self._name
I've written it just enough times to be annoyed enough to capture this module. The result is this::
from memoized_property import memoized_property
def class C(object):
@memoized_property
def name(self):
# Boilerplate guard conditional avoided, but this is still only called once
return some_expensive_load()
I couldn't find a pre-existing version of this on PyPI. I found one other on GitHub, https://github.com/ytyng/python-memoized-property, but it was not published to PyPI.
1.0.3 (2016-09-28) ++++++++++++++++++
1.0.2 (2014-05-02) ++++++++++++++++++
1.0.1 (2014-01-01) ++++++++++++++++++
1.0.0 (2013-12-26) ++++++++++++++++++
FAQs
A simple python decorator for defining properties that only run their fget function once
We found that memoized-property demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
Application Security
/Security News
Socket CEO Feross Aboukhadijeh and a16z partner Joel de la Garza discuss vibe coding, AI-driven software development, and how the rise of LLMs, despite their risks, still points toward a more secure and innovative future.