semvec/pypi-packages huggingface dataset:
literal-dict 1.1.0
Use JavaScript-like object definition syntax in Python
License: MIT
Requires Python: >=3.6

# Literal Dict

`literal-dict` is a Python utility that allows for the creation of dictionary objects with a syntax reminiscent of JavaScript object notation. This tool is particularly useful for developers looking to streamline their code by reducing the verbosity commonly associated with dictionary creation in Python.

## Features

- **Intuitive Variable Inclusion**: Create Python dictionaries using a syntax similar to JavaScript objects: automatically uses variable names as keys, simplifying the process of dictionary creation.
- **Flexible Dictionary Implementations**: Supports custom dictionary implementations, enabling behaviors like ordered dictionaries, default dictionaries, dot dictionaries, and more.
- **Various Python Distribution Supports**: This package is tested under almost every popular python implementations.

## Installation

```bash
pip install literal-dict
```

## Usage

### Basic Dictionary Creation

Start by importing `DictBuilder` from the package:

```py
from literal_dict import DictBuilder
```

Create a `DictBuilder` instance:

```py
d = DictBuilder()
```

Now, you can create dictionaries with a simplified syntax:

```py
name = "Muspi Merol"
age = 20

user = d[name, age, "active": True]
print(user)  # Output: {'name': 'Muspi Merol', 'age': 20, 'active': True}
```

### Using Custom Dictionary Implementations

`DictBuilder` allows specifying a custom dict-like type:

#### Example with `types.SimpleNamespace`

Using `SimpleNamespace` from the `types` module allows for attribute-style access to dictionary keys. This can make your code cleaner and more readable in some cases.

```python
from types import SimpleNamespace

from literal_dict import DictBuilder

d = DictBuilder(lambda dict: SimpleNamespace(**dict))

name = "Muspi Merol"
email = "me@promplate.dev"

person = d[name, email]
print(person.name)  # Output: Muspi Merol
print(person.email)  # Output: me@promplate.dev
```

Note: When using `SimpleNamespace`, the returned object is not a dictionary but an instance of `SimpleNamespace`, which allows for dot-notation access to the attributes.

#### Example with `collections.defaultdict`

```py
from collections import defaultdict
from functools import partial

from literal_dict import DictBuilder

d = DictBuilder(partial(defaultdict, int))

a = 1

obj = d[a, "b":2]
print(obj["c"])  # Output: 0, since 'c' does not exist, it returns the default int value
```

## Conclusion

The `Literal Dict Builder` offers a succinct and intuitive way to create dictionaries in Python, drawing inspiration from JavaScript's object notation. Its support for custom dictionary implementations adds a layer of flexibility, allowing developers to tailor their data structures to fit their needs.
RsCmwBase 4.0.110
CMW Base System Remote-control module
License: MIT
Requires Python: >=3.6

==================================
 RsCmwBase
==================================

.. image:: https://img.shields.io/pypi/v/RsCmwBase.svg
   :target: https://pypi.org/project/ RsCmwBase/

.. image:: https://readthedocs.org/projects/sphinx/badge/?version=master
   :target: https://RsCmwBase.readthedocs.io/

.. image:: https://img.shields.io/pypi/l/RsCmwBase.svg
   :target: https://pypi.python.org/pypi/RsCmwBase/

.. image:: https://img.shields.io/pypi/pyversions/pybadges.svg
   :target: https://img.shields.io/pypi/pyversions/pybadges.svg

.. image:: https://img.shields.io/pypi/dm/RsCmwBase.svg
   :target: https://pypi.python.org/pypi/RsCmwBase/

Rohde & Schwarz CMW Base System RsCmwBase instrument driver.

Basic Hello-World code:

.. code-block:: python

    from RsCmwBase import *

    instr = RsCmwBase('TCPIP::192.168.2.101::hislip0')
    idn = instr.query('*IDN?')
    print('Hello, I am: ' + idn)

Supported instruments: CMW500, CMW100, CMW270, CMW280

The package is hosted here: https://pypi.org/project/RsCmwBase/

Documentation: https://RsCmwBase.readthedocs.io/

Examples: https://github.com/Rohde-Schwarz/Examples/


Version history
----------------

Release Notes for the whole RsCmwXXX group:

Latest release notes summary: Update for FW version 4.0.x

	Version 4.0.110.49
		- Update for FW version 4.0.x

	Version 3.8.xx2
		- Fixed several misspelled arguments and command headers

	Version 3.8.xx1
		- Bluetooth and WLAN update for FW versions 3.8.xxx

	Version 3.7.xx8
		- Added documentation on ReadTheDocs

	Version 3.7.xx7
		- Added 3G measurement subsystems RsCmwGsmMeas, RsCmwCdma2kMeas, RsCmwEvdoMeas, RsCmwWcdmaMeas
		- Added new data types for commands accepting numbers or ON/OFF:
		- int or bool
		- float or bool

	Version 3.7.xx6
		- Added new UDF integer number recognition

	Version 3.7.xx5
		- Added RsCmwDau

	Version 3.7.xx4
		- Fixed several interface names
		- New release for CMW Base 3.7.90
		- New release for CMW Bluetooth 3.7.90

	Version 3.7.xx3
		- Second release of the CMW python drivers packet
		- New core component RsInstrument
		- Previously, the groups starting with CATalog: e.g. 'CATalog:SIGNaling:TOPology:PLMN' were reordered to 'SIGNaling:TOPology:PLMN:CATALOG' give more contextual meaning to the method/property name. This is now reverted back, since it was hard to find the desired functionality.
		- Reorganized Utilities interface to sub-groups

	Version 3.7.xx2
		- Fixed some misspeling errors
		- Changed enum and repCap types names
		- All the assemblies are signed with Rohde & Schwarz signature

	Version 1.0.0.0
		- First released version