Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

python-immutable

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

python-immutable

Immutable implementation for Python using dataclasses

  • 1.1.1
  • PyPI
  • Socket score

Maintainers
1

README.md for Immutable Library

Overview

This library provides decorators and base classes to create immutable data classes in Python. By enforcing immutability and keyword-only arguments, it enhances the robustness and clarity of your data structures.

📋 Requirements

  • Python 3.9 or later.
  • No external dependencies are required.

📦 Installation

Pip

pip install python-immutable

Poetry

poetry add python-immutable

🛠 Usage

Using immutable Decorator

Apply immutable to a class to make it immutable and enforce keyword-only arguments.

from immutable import immutable

@immutable
class MyClass:
    # Fields here

Extending Immutable Base Class

Inherit from Immutable for similar functionality.

from immutable import Immutable

class MyClass(Immutable):
    # Fields here

🤝 Contributing

Contributions are welcome. Please submit pull requests or issues on the GitHub repository.

⚠️ Important Note

Ensure compatibility with Python 3.9 or newer when contributing.

🔒 License

This project is released under the Apache-2.0 License. See the LICENSE file for more details.

FAQs


Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc