Skip to main content

netlink-core

Core components of NetLink tools

Updates

0.0.4

Add netlink.core.Mapping Abstract class, must implement __init__.

This provides a small set of functionality share by my collection of tools:

Contents

  • Centralized configuration using TOML in the users home directory (subdirectory .netlink).

Classes

netlink.core.AttributeMapping

behaves like an immutable mapping, adding access to all items via property notation:

  a['b'] == a.b

This is propagated through all levels, when parameter deep is True (default):

  a['b']['c']['d'] == a.b.c.d
Parameter Default
value mandatory Mapping containing information. Might be deep.
deep True Items within the mapping will be copied, not referenced (implemented for Lists and Mappings).
case_sensitive False If False, ignore case when retrieving items or attributes.
under True Try dash (-) if underscore (_) in name not found.

netlink.core.Singleton

is a base class to be inherited from to make all instances of a class the same.

netlink.core.Config

is a Singleton that provides configuration information (will be initialized the first time).

Scripts

  • create_netlink_defaults creates a TOML file containing all currently internal defaults in the users home directory ( subdirectory .netlink). If the file already exist, the current file is copied as a backup with extension .001.

Installation

Use your preferred tool to install from PyPI. I prefer Poetry.

License

MIT

Download files

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

Source Distribution

netlink-core-1.1.2.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

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

netlink_core-1.1.2-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

Release history Release notifications | RSS feed

This release

1.1.2 This release

2 files

1.1.1

2 files

1.1.0

2 files

1.0.0

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

0.0.0

2 files

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