semvec/pypi-packages huggingface dataset:
snapcache 1.0.0
Snap-in memory caching for Python, no persistence, just pure function result caching.
License: MIT
Requires Python: <4.0,>=3.8
Keywords: cache, functools, lru_cache, unhashable

# SnapCache

<a href="https://pypi.python.org/pypi/snapcache"><img src="http://img.shields.io/pypi/v/snapcache.svg" alt="Latest version on PyPI"></a> <a href="https://pypi.python.org/pypi/snapcache"><img src="https://img.shields.io/pypi/pyversions/snapcache.svg" alt="Compatible Python versions."></a>

Snap-in memory caching for Python, no persistence, just pure function result caching.

## Motivation

Python’s built-in `functools.lru_cache` offers an easy way to cache function results, but it has limitations. For example, attempting to cache complex objects like `NumPy` arrays results in a `TypeError: unhashable type: 'numpy.ndarray'`.

**SnapCache** addresses this issue by offering a similar simple decorator interface while supporting caching for any data structure ✨.

## Installation

To install **SnapCache**, use `pip`:

```bash
pip install snapcache
```

## Usage

### Function-level Caching

You can cache function results using the `WithCache` decorator. Just apply it to any function you want to memoize.

```python
from snapcache import WithCache

@WithCache(maxsize=3)
def add(a, b):
    return a + b

# Call the function multiple times
print(add(1, 2))  # First call, result is computed and cached
print(add(1, 2))  # Second call, result is retrieved from cache
```

### Method-level Caching

You can also apply the decorator to class methods:

```python
class Foo:
    @WithCache(maxsize=3)
    def bar(self, a, b):
        return a - b

foo = Foo()
print(foo.bar(10, 5))  # First call, result is computed and cached
print(foo.bar(10, 5))  # Second call, result is retrieved from cache
```

## License

This project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.
bettercorrectfast 0.2.0
Simplified BIM Collaboration Format (BCF) generation for project leaders and managers
License: MIT
Requires Python: >=3.10

# BetterCorrectFast

Simplified BIM Collaboration Format (BCF) generation for project leaders and managers.

![](bettercorrectfast/assets/icon.jpg)

[![PyPI](https://img.shields.io/pypi/v/bcf-client?label=PyPI&color=006dad)](https://pypi.org/project/bettercorrectfast/)

## Usage

Install the library:
```
pip install bettercorrectfast
```

Create and save an issue locally:
```
import bettercorrectfast as bcf

issue = bcf.create("Title", "Description", "Screenshot.png")
bcf.save(issue, "issue.bcf")
```

It is also possible to add a title, description, snapshot and/or ifc-guids to the issue:

```
issue_from_text = bcf.create("Title", "Description")

issue_from_title = bcf.create(title="Title)
issue_from_description = bcf.create(description="Description")
issue_from_image = bcf.create(image_filepath="Screenshot.jpg")
issue_from_ifc_guids = bcf.create(ifc_guids=["1rDWROW8j2v8TxahWHKI_E", "1rDWROW8j2v8TxahWHKap1"])
```


## Technical Notes

The issue schema conforms to the BCF (BIM Collaboration Format) version 2.1 standard as defined by buildingSMART International.

**Note:** This library currently supports image snapshots exclusively in .png format. Support for .jpg format is in development.

## Building the Package

Setting up a virtual environment:
```
python -m venv env
```

Activating the virtual environment:
```
:: Windows CMD
env\Scripts\activate.bat
```
```
# Windows PowerShell
env\Scripts\Activate.ps1
```
```
# macOS/Linux
source venv/bin/activate
```

Installing required libraries:
```
pip install -r requirements.txt
```

Running tests:
```
python -m unittest discover -s tests
```

Building the package:
```
python setup.py sdist bdist_wheel
```