semvec/pypi-packages huggingface dataset:
load-const 2023.5.0
Load variables from consts in Python functions.
Requires Python: >=3.8

`load_const`
============

**Load const objects in Python functions**

This is a micropackage with a decorator `@load_const.store` that can be used to
store objects in the `co_consts` array of Python functions.  This is a tuple of
constant objects[^1] which are hard-copied into the function definition.  The
objects can then be loaded into variables in a function without depending on
globals or closures.

How this works is probably easier shown than explained:

```py
>>> import load_const
>>>
>>> x, y, z = 1, 2, 3
>>>
>>> @load_const.store(x)
... def f():
...     x = "__const__"
...     print(f"{x=}")
...
>>> @load_const.store(x, y, z)
... def g():
...     x, y, z = "__const__"
...     print(f"{x=}, {y=}, {z=}")
...
>>> del x, y, z
>>>
>>> f()
x=1
>>> g()
x=1, y=2, z=3

```

Loading the variables from `co_consts` relies on replacing the string literal
`"__const__"` with the objects passed to the `@load_const.store` decorator.
The string `"__const__"` can hence not be used for anything else in the
decorated function.[^2]


[^1]: "Constant" here refers to the fact that the variable will always point to
      the same object.  The object itself will still be mutable.
[^2]: Strings containing the substring `"__constvars__"` are not affected.
chksum-cli 1.1.0
Compare checksums from the command line
Requires Python: >=3.10

<p align="center">
<a href="https://pypi.org/project/chksum-cli/">
<img align="center" src="https://raw.githubusercontent.com/espehon/chksum-cli/main/docs/images/Demo.png"/>
</a>
</p>

# chksum
CLI for comparing two checksums


# Install
Requires Python >= 3.10
```
pip install chksum-cli
```


# Features
- User friendly non-specific argument order
- Visual feedback comparing hashes
- Exit code matches hash results
- Can ignore dot files
- Interactive mode
- Hash only function
- Can use md5, sha1, sha256, and sha512


# Usage
```
CHKSUM [-?] [-i] [-d] position1 position2 [position3]

Calculate and compare the checksums of files or directories.
Can also compare against pasted strings.
ALGORITHMS = ['md5', 'sha1', 'sha256', 'sha512']

positional arguments:
  position1          Checksum, file, or algorithm
  position2          Checksum, file, or algorithm
  position3          Checksum, file, or algorithm

options:
  -?, --help         Show this help message and exit.
  -i, --interactive  Run in interactive mode.
  -d, --dots         Ignore '.' (dot) files from directories.

If the first 2 positional arguments are strings, the algorithm is not needed. Default is md5.
Likewise, passing only a single path will simply out the digest.
```
Arguments can be passed in any order. [Note: [This issue](#issues)]\
E.g. the following are equivalent:\
`chksum <PathToFile> <PathToDir> sha256 -d`\
`chksum -d <PathToDir> sha256 <PathToFile>`


# Interactive mode
Use `-i` to enter the interactive mode where arguments can be passed one at a time.\
Note that `-i` is mutually exclusive.
```
$ chksum -i

      _     _
     | |   | |
  ___| |__ | | _____ _   _ _ __ ___
 / __| '_ \| |/ / __| | | | '_ ` _ \
| (__| | | |   <\__ \ |_| | | | | | |
 \___|_| |_|_|\_\___/\__,_|_| |_| |_|
 Copyright (c) 2022, espehon
 All rights reserved.

 ALGORITHMS = ['md5', 'sha1', 'sha256', 'sha512']

Enter Algorithm or path to File or Directory >
```
Inputs are checked after each entry and the prompt is updated accordingly
```
Enter Algorithm or path to File or Directory > ./
        Directory entered.
Enter Algorithm or path to File or Directory > ./
        Directory entered.
Enter Algorithm > md5
        Algorithm entered.
Do you want to include '.' (dot) files? [Y/n] > n
        include_dots = False

-------------[MD5]--------------
59198d6aad1674a0b372027ce275a9b6
59198d6aad1674a0b372027ce275a9b6
√ Hashes Match
```


# <a name="issues"></a>Issues
Using `-d` in between positionals can causes an argparse error. (See Issue: [#11](https://github.com/espehon/chksum-cli/issues/11))\
Example:\
        `$ chksum ./file ./file -d sha1`


# Author

- [@espehon](https://www.github.com/espehon)
txp 0.3.22.dev130520231238
Txp is the main Python Package from Tranxpert predictive maintenance solution
Requires Python: >=3.7,<4.0
Keywords: IOT,IIOT,Predictive Maintenance

# TXP

## Development
The following tools are used for this project:

- [Poetry](https://python-poetry.org/) is used for dependency and package managment
- [Nox](https://nox.thea.codes/en/stable/) is used as automation tool, mainly for testing
- [Black](https://black.readthedocs.io/en/stable/) is the mandatory formatter tool
- [PyEnv](https://github.com/pyenv/pyenv) is recommended as a tool to handle multiple python versions in developers machines. 

### Setup the development environment

1. Install a supported Python version on your machine (compatible Python versions ^3.8). The recommended way is to use [PyEnv](https://github.com/pyenv/pyenv).

2. Install the global Python required dependencies: 

    ```
    pip install poetry nox
    ```

3. Clone this repository, and execute the following command in the repository root folder:

    ```
    poetry install
    ``` 
    This will install all the dependencies for `txp` in a virtual enviroment created by Poetry for your project. 
    All the required dependencies for development are installed in that virtual enviroment. 

4. Configure your IDE to work with the virtual enviroment or the command line if you use an editor. 

    To activate the virtual enviroment on your terminal (MacOS, Linux) you can execute:
    ```
    source /path/to/poetry/cache/virtualenvs/test-O3eWbxRl-py3.7/bin/activate
    ```

    The path to your virtual enviroment location can be found with `poetry env info` [command](https://python-poetry.org/docs/managing-environments#displaying-the-environment-information). 

### Testing