semvec/pypi-packages huggingface dataset:
apple-wallet 0.2.0
A simple library to create Apple passes compatible with Wallet
License: MIT
Requires Python: <4.0,>=3.12
Keywords: apple pass, apple wallet

# Apple Wallet

A very simple library to generate Passes for Apple Wallet

Model-based (hello pydantic)

### Configuration

All the configuration comes through environment vars (see `pydantic-settings`, but can be overwritten):

- **APPLE_WALLET_TEMPLATE_PATH**: Path to the templates. Every template is a folder called `<TEMPLATE>.pass` that follows the structure defined in [3]. Defaults to `./templates`

- **APPLE_WALLET_CERTIFICATE_PATH**: Path to the folder containing certificates and keys. Defaults to `./certificates`. Three certificates are needed:
  - Key
  - CSR
  - WWDR

### Tests

202409: Tested for iOS 17 and 18

### Acknowledgments

This library is heavily based on the examples and code provided in:

[1] https://github.com/twopointone/applepassgenerator (Worked fine but I am addicted to Pydantic)

[2] https://github.com/alexandercerutti/passkit-generator (Excellent ideas that I try to replicate in Python)

### More about Apple Pass ###
[3] Reference: Human Interface: https://developer.apple.com/design/human-interface-guidelines/wallet

[4] Reference: PassKit: https://developer.apple.com/wallet/

[5] Reference: PassKit Package Format Reference: https://developer.apple.com/library/archive/documentation/UserExperience/Reference/PassKit_Bundle/Chapters/Introduction.html
patch-package 0.1.3
Automatically generate and apply patches to fix installed packages
License: MIT
Requires Python: !=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7

# patch-package

![PyPI - Python Version](https://img.shields.io/pypi/pyversions/patch-package)
![PyPI](https://img.shields.io/pypi/v/patch-package)

**patch-package** is a Python library to automatically create and apply patches from changes made in installed packages. It is heavily inspired by [patch-package](https://github.com/ds300/patch-package) which is the equivalent for Node packages.

## Features

* Compatible with Python 2.7 and Python 3.5+
* Automatic code change detection between installed package and package source from pip
* Prevent patching when version or code are mismatching
* Automatic matching between import names and package names (e.g. yaml -> PyYAML) and fuzzy matching (e.g. request -> requests)

## Usage

Install the library from PyPI

    pip install patch-package

Make a change in one of your installed package and then generate the corresponding patch

    patch-package <package-name>

Then when reinstalling the package you can apply back your patches

    patch-package

All patches are contained in the *patches/* folder so it can be commited to git and reapply whenever you want

## Development

Make sure you have pyenv installed.

Install the tox library

    pip install tox

Run tests

    tox
al78tools 1.0.2
Tools for PySetup etc.
License: MIT
Requires Python: >=3.6

# al78 tools

## Tools for Python setup file
Simple tools to complete setup.py file


## Installation
```bash
pip3 install al78tools
```

## Usage

### Handle App first run

There is no way to run some post install bash code after pip package installation. But you can use this simple
tool to run some bash code after first run of your app.

#### Example
`main.py` file
```python
import os
from al78tools.pysetup.first_run import first_run_decorator
from al78tools.pysetup.tools import get_file_content


APP = "my-app-name"
VERSION = get_file_content(os.path.join(os.path.dirname(__file__), "VERSION"))


@first_run_decorator(APP, VERSION)
def _handle_first_run():
    import subprocess
    result = subprocess.run([os.path.join(os.path.dirname(__file__), "postinstall.sh")])
    if result.returncode != 0:
        print("Postinstall script failed.")


def main():    
    _handle_first_run()
    # rest of your code

if __name__ == '__main__':
    main()
```
!!! Warning !!! Do not forget to add `postinstall.sh` file to your `MANIFEST.in` file.
After this, you can use `postinstall.sh` file to run some bash code after first run of your app.
There is a version string compare mechanism. If version differs from previous version, the `postinstall.sh` will be run.
If you want to run `postinstall.sh` only once during all package updates, do not fill version paremeter in `first_run_decorator` function
and it will run only for the first time of package installation.


### File content reading
`setup.py` file
```python
import os
from al78tools.pysetup.tools import get_file_content, get_file_content_as_list


pwd = os.path.dirname(__file__)

VERSION = get_file_content(os.path.join(pwd, "VERSION"))
README_MD = get_file_content(os.path.join(pwd, "README.md"))
requirements = get_file_content_as_list(os.path.join(pwd, "requirements.txt"))
```
fastapi-users-ormar-extension 0.3.0
Use ormar for your fastapi-users project.
License: MIT
Requires Python: <4.0,>=3.9

# fastapi-users-ormar-extension
Extension to use ormar in fastapi-users


# Installation

To install use:
```sh
pip install fastapi-users-ormar-extension
```

# Usage

Example:

```python
from typing import Optional

import ormar

from fastapi_users_ormar_extension import (
    OrmarBaseUserTableUUID,
    OrmarBaseOAuthAccountTableUUID,
)


class BaseMeta(ormar.ModelMeta):
    """Base metadata for models."""

    database = database
    metadata = meta


class User(OrmarBaseUserTableUUID):
    class Meta(BaseMeta):
        pass

    phone: str = ormar.String(nullable=False, max_length=100)


class OAuthAccount(OrmarBaseOAuthAccountTableUUID):
    class Meta(BaseMeta):
        pass

    user: User = ormar.ForeignKey(User, nullable=False, ondelete="cascade")
```