semvec/pypi-packages huggingface dataset:
lazimp 0.0.5
LazImp, the package for lazy import of packages, modules and symboles
Requires Python: >=3.10

# LazImp, The "don't wait for it..." package

LazImp is a package that allows lazy loading of python modules, packages and
symboles for python 3.10+. This package allows you to load modules and packages
only **when** the user use it. From dynamic import to "I only need this
function, not the whole framework", the start-up time is speed-up and delayed
over the execution of the software.

Using LazImp, you will reduce the memory usage and the start-up time of your
software.

## Example

First, you may have long loading or memory heavy modules to expose in your
package api:

```python
# package/heavy_module.py
print('Heavy module is loading...')
from time import sleep

sleep(10)
print('heavy_module loaded')
```

But instead of importing them directly, you can do a lazy import in
the `__init__.py`:

```python
# package/__init__.py of a package
import lazimp

math: lazimp.ModuleType
heavy_module: lazimp.ModuleType

__getattr__ = lazimp.lazy_import(
    'math',
    heavy_module='package',
)
```

Now, when you import the package:

```python
# main.py
import package

print('Before access to heavy_module')
print(package.heavy_module)
print('After access to heavy_module')
print('Before access to math')
print(package.math)
print('After access to math')
```

And the output:

```txt
Before access to heavy_module
Heavy module is loading...
(wait 10 sec)
heavy_module loaded
<module 'heavy_module' from '...'>
After access to heavy_module
Before access to math
# math loaded
<module 'math' (built-in)>
After access to math
```

Without the lazy loading of `heavy_module.py`, the output would have been:

```txt
Heavy module is loading...
(wait 10 sec)
heavy_module loaded  # math loaded too
Before access to heavy_module
<module 'heavy_module' from '...'>
After access to heavy_module
Before access to math
<module 'math' (built-in)>
After access to math
```

## Why this name: LazImp?

`lazimp` is a portmanteau of `lazy` and `imp`.

`imp` was the name of the module `importlib` before python 3.4 and its
deprecation: [What's new in Python 3.4: Deprecations in the Python API](https://docs.python.org/3/whatsnew/3.4.html#deprecations-in-the-python-api)

The name could have been `lazy_import` but the `imp` part was preferred as a
reference to the original module and because an
imp with sunglasses and cocktail is cool 😎, and `lazy` shorten because it
sounded better.
json2img 0.1.2
Generate randomly colored images from Label Studio annotations
Requires Python: >=3.7

# json2img

A Python script for generating randomly colored images from Label Studio annotations

## Installation
```shell
% pip install json2img
```

## Usage

### Command line

```shell
% python -m json2img brick_annotation.json bricks.png
% python -m json2img hand_annotation.json sign.jpg -v
```

### Module

```python
>>> from json2img import *
>>> save_image('brick_annotation.json', 'bricks.png')
>>> save_image('hand_annotation.json', 'sign.jpg', view=True)
```
## Dependencies

* CPython >= 3.7
* pygame >= 2.0.0
sim32 2.0.0
Library to help you write games
Requires Python: >=3.10

## Sim-Engine
Helps to create games without limiting you

### Advantages
* **Speed** - You will very quickly start developing without paying attention to the infrastructure (but you can also tailor it to your needs)
* **Connectability** - You can quickly connect the engine to an already created game
* **Flexibility** - You are not even limited to 2 or 3 dimensions!
* **Controllability** - You can incredibly deftly operate with the logic of your game
* **Fullness** - Integration with pygame rendering solution

### Installation
`pip install sim32`