semvec/pypi-packages huggingface dataset:
py-fcm-tiger 0.1.2
A wrapper library for using firebase-admin-python to send data and notification messages.

## py_fcm_tiger

### A wrapper library for using firebase-admin-python + APNs to send notifications.

## Installation

This library requires [python](https://www.python.org/) >=3.6 to run.

```
pip install py_fcm_tiger
```
## Prerequisite

- Generate [FCM](https://firebase.google.com/docs/admin/setup#initialize-sdk) service token and keep the token in the working directory
- Generate [APNs](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/establishing_a_token-based_connection_to_apns) token and keep the token in the working directory

## Usage

```
from py_fcm_tiger.processor import NotificationProcessor
fcm = "/path/to/service-account.json"
apns = {
    "APNS_AUTH_KEY": "/path/to/auth/key.p8",  # .p8 file
    "TEAM_ID": "APNS_TEAM_ID",
    "ALGORITHM": "ENCRYPTION_ALGORITHM",  # e.g. ES256
    "APNS_KEY_ID": "APNS_KEY_ID",
    "BUNDLE_ID": "app.bundle.id",
    "IOS_HTTP_URL": "api.development.push.apple.com:443" 
}
notification_processor = NotificationProcessor(fcm=fcm, apns=apns)
notification_processor.process_message(data1)
```

## Example

```
from py_fcm_tiger.processor import NotificationProcessor

device_tokens = ['s_token','a_token','s2_token']
data1 = {
    "type": "fcm",
    "device_token": 'a_token',
    "send_mode": "single",
    "notification": {
        "message_title": "single-ttl-test-factory",
        "message_body": "single-ttl-factory-passed",
    },
}

data2 = {
    "type": "fcm",
    "device_tokens": device_tokens,
    "send_mode": "multiple",
    "notification": {
        "message_title": "multiple-ttl-test-factory",
        "message_body": "multiple-ttl-factory-passed",
    },
}

fcm = "/path/to/service-account.json"

apns = {
    "APNS_AUTH_KEY": "/path/to/auth/key.p8",  # .p8 file
    "TEAM_ID": "APNS_TEAM_ID",
    "ALGORITHM": "ENCRYPTION_ALGORITHM",  # e.g. ES256
    "APNS_KEY_ID": "APNS_KEY_ID",
    "BUNDLE_ID": "app.bundle.id",
    "IOS_HTTP_URL": "api.development.push.apple.com:443" 
}

notification_processor = NotificationProcessor(fcm=fcm, apns=apns)

result = notification_processor.process_message(data1)
multi_notification_response = notification_processor.process_message(data2)

print(result)
print(
    f'multiple notify: {multi_notification_response["full_response"].success_count} of {len(device_tokens)} messages were sent successfully'
)

```
deep-folder 1.0.2
create or remove a simple folder
Requires Python: >=3.6

<h1 align="center">
  DEEP FOLDER
</h1>

**[create]** If it is a path where a folder can be created, the folder is created up to the parent-path.

**[remove]** If it is a path where a folder can be remove, the folder is remove down to the sub-path


### INSTALL

You can use [pip]((https://pypi.org/project/deep-folder/)) or just clone and copy the code.

**INSTALL FROM PIP**
```bash
pip install --upgrade deep-folder
```

**INSTALL FROM LOCAL**
```bash
pip install --upgrade setuptools wheel twine
python setup.py sdist bdist_wheel
pip install ./dist/deep-folder-*.tar.gz
```

### LICENSE

__MIT__

*You may modify or take away the code, but you cannot claim responsibility from me.* - by sotaneum