Skip to main content

A simple pythonic module to lock (make read-only) and hide class attributes

Project description

attribmanager

A simple pythonic module to lock (make read-only) and hide class attributes

Installation

pip install attribmanager

Usage

import attribmanger

class example(attribmanger.manage):

	def __init__(self):

		self.mylist = ["item 1", "item2"]
		self.lock("mylist")
		# mylist is read only and cannot be edited now, changing it
		# will raise an error, 

		self.myvar = "foo"
		self.hide("myvar")
		# myvar will not show up anywhere, and cannot be edited

		self.unhide("myvar")
		# Hiding an object without being able to unhide it would be
		# the same as deleting it, that's why you can unhide it

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

attribmanager-1.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distributions

attribmanager-1.0.0-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

attribmanager-1.0-py2.py3-none-any.whl (15.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file attribmanager-1.0.tar.gz.

File metadata

  • Download URL: attribmanager-1.0.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for attribmanager-1.0.tar.gz
Algorithm Hash digest
SHA256 187301adff1778564630496803b49e06a84886f97f4cbc65c56473c4c6ceb93f
MD5 59d347d1df601d7a4f57575f86570f18
BLAKE2b-256 ef2efab392bbda49362243b5176753b5f8f306b08a2bfb57febc006b91271eb0

See more details on using hashes here.

File details

Details for the file attribmanager-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: attribmanager-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 18.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for attribmanager-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9c6eb3b15c8051fe4f9d3df85064776dfdfa030b57292f7b2e7d9cc8e85cb939
MD5 9b49eb972e61c0ba42dd1e8e91c9a2fa
BLAKE2b-256 3fbd231fb97b2a32dee65d8007fa267f2ad3d584f8b7717360196d2b9adea1d2

See more details on using hashes here.

File details

Details for the file attribmanager-1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: attribmanager-1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for attribmanager-1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4c7645cbfd627bfa48184775be4fc63dda9b22c7529810e549e211546cbee934
MD5 d97beae866aaac6b8743b8622d1ae00d
BLAKE2b-256 4d86ec23e4202d367862ac050770936a5200abbccff11e58f82290f5d3a981c0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page