Skip to main content

Krausening Python - Externalized Property Management and Access for Python Projects

License PyPI PyPI - Python Version PyPI - Wheel PyPI - Downloads

Krausening property management and encryption for Python is packaged using the open-source Python Maven plugin Habushu and made available as a PyPI package.

Distribution Channel

Krausening Python is published to PyPI under the krausening project and may be installed using any package installer/manager that leverages PyPI. For example:

  • Poetry - poetry add krausening
  • pip - pip install krausening

Managing Properties with Krausening and Python

Managing properties with Krausening's Python library utilizes a similar approach to that required by Krausening Java. Krausening Python expects that developers prime their target environment by configuring the following environment variables (which are named and leveraged in the same manner as the Java System Properties expected by Krausening Java):

  • KRAUSENING_BASE
  • KRAUSENING_EXTENSIONS
  • KRAUSENING_OVERRIDE_EXTENSIONS
  • KRAUSENING_PASSWORD

In order to use the Krausening Python, developers may directly use PropertyManager or extend PropertyManager to provide a custom interface. For example, developers may directly use the PropertyManager as such:

from krausening.properties import PropertyManager

propertyManager = PropertyManager.get_instance()
properties = None
properties = propertyManager.get_properties('my-property-file.properties')
assert properties['foo'] == 'bar2'

This has the disadvantage that you must know the property keys in order to find the corresponding property values. To mitigate the need for all property file consumers to rely on specific property keys, consider wrapping the PropertyManager and writing your own custom methods to get the corresponding keys and values, abstracting away the exact key values:

from krausening.properties import PropertyManager

class TestConfig():
    """
    Configurations utility class for being able to read in and reload properties
    """

    def __init__(self):
        self.properties = None
        self.reload()
 
    def integration_test_enabled(self):
        """
        Returns whether the integration tests are enabled or not
        """
        integration_test_enable = False
        integration_enable_str = self.properties['integration.test.enabled']
        if (integration_enable_str):
            integration_test_enable = (integration_enable_str == 'True')
        return integration_test_enable
    
    def reload(self):
        self.properties = PropertyManager.get_instance().get_properties('test.properties')

Releasing to PyPI

Releasing Krausening Python integrates into the project's larger utilization of the maven-release-plugin, specifically publishing the package to PyPI during the deploy phase. A PyPI account with access to the krausening project is required. PyPI account credentials should be specified in your settings.xml under the <id>pypi</id> <server> entry:

<settings>
  <servers>
    <server>
      <id>pypi</id>
      <username>pypi-username</username>
      <password>pypi-password</password>
    </server>
  </servers>
</settings>

Metadata

Release files for krausening 20

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for krausening 20
File Size Uploaded Provenance Actions
krausening-20.tar.gz 5.7 kB Without provenance Details for krausening-20.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for krausening 20
File Interpreter ABI Platform Actions
krausening-20-py3-none-any.whl Python 3 none any Details for krausening-20-py3-none-any.whl

Total release size: 13.0 kB

Release files / krausening-20.tar.gz

Download URL krausening-20.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0616005734cdfb75b6e3beaf2c1dd8d96ac929c9ca9214949f5458a10835335f
BLAKE2b-256 checksum
How to use checksums
21fd3e2318402f5e198524074edcc5022d2ebb00b9aa7da3ef3b97427f7b79ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.5 Darwin/23.6.0

Release files / krausening-20-py3-none-any.whl

Download URL krausening-20-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c3e62b1908e5589dbb39b2061a968f6b2a6817881e327ab7bd514b5d443e6f0e
BLAKE2b-256 checksum
How to use checksums
d6c481d055739a1aae3598009b19f2a6ffa259c936883e376d940f21c548caf3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.5 Darwin/23.6.0

Security for krausening 20

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page