Skip to main content

Access Modify

Use private, protected class methods in Python!

Download

pip install access-modify

Example

from access_modify import *


@access
class Test:
    # Test.a can be used by Test class methods.
    @private
    def a(self): return 1

    # Test.b can be used by Test class, or inherited class methods.
    @protected
    def b(self): return self.a()+1

class Inherited(Test):
    @public
    def c(self): return self.b()+1

r = Test()
w = Inherited()
print(r.a()) # raise AccessException
print(r.b()) # raise AccessException
print(w.c()) # 3

Download files

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

Source Distribution

Access-Modify-1.0.5.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Access_Modify-1.0.5-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file Access-Modify-1.0.5.tar.gz.

File metadata

  • Download URL: Access-Modify-1.0.5.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7

File hashes

Hashes for Access-Modify-1.0.5.tar.gz
Algorithm Hash digest
SHA256 d0e05be4d5239a81757f3d9cf5547b3ca161da6c53d39000c1a371c7c2651894
MD5 3f17380c9fc2d2940d06b8cb8e485631
BLAKE2b-256 e84ff4bcf80bc0854f713b901475d82a84e5f7cda70acb55de1933d1d5d4a26f

See more details on using hashes here.

File details

Details for the file Access_Modify-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: Access_Modify-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7

File hashes

Hashes for Access_Modify-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 81ace968dc970ab509aabe6a59167e5ab1c157bb53094ee5d807d1d94e21e70e
MD5 f8eb8586999810cddd803f22e2fcfe71
BLAKE2b-256 2d4086ec5ad97d60ea06aebbf8df315c30223231b0c83ac0696071200552de29

See more details on using hashes here.

Supported by

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