semvec/pypi-packages huggingface dataset:
reaxpro-workflow-service 2.0.0
A package running semantically enriched workflows with SimPhoNy and Celery
Requires Python: >=3.6

# ReaxPro Workflow Service

A simple [FastAPI-framework](https://fastapi.tiangolo.com/) for running asynchronous tasks through [python-celery](https://pypi.org/project/celery/). This app is targeted to be a high-level API for the workflow-orchestration of the [ReaxPro-platform](https://www.reaxpro.eu/).

## Authors

[Matthias Büschelberger](mailto:matthias.bueschelberger@iwm.fraunhofer.de) (Fraunhofer Institute for Mechanics of Materials IWM)
[Kiran Kumaraswamy](mailto:kiran.kumaraswamy@iwm.fraunhofer.de) (Fraunhofer Institute for Mechanics of Materials IWM)

## Documentation

Please refer to the [ReadTheDocs-pages](https://reaxpro.pages.fraunhofer.de/docs/) for the overall installation procedure, tutorials and use case documentation.

## Python dependencies

First of all, you will need to install OSP-core

```shell
(env) user@computer:~$ pip install osp-core
```

Then, install the wrapper. Simply type:

```shell
(env) user@computer:~$ pip install reaxpro-workflow-service
```

... or if you are installing from source (cloning of the repository needed before):


```shell
(env) user@computer:~/reaxpro-workflow-service$ pip install .
```

## License

This project is licensed under the BSD 3-Clause. See the LICENSE file for more information.

## Disclaimer

Copyright (c) 2014-2023, Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. acting on behalf of its Fraunhofer IWM.

Contact: [SimPhoNy](mailto:simphony@iwm.fraunhofer.de)
cf-secure-edge 0.0.1
AWS CloudFront token generator
Requires Python: >=3.7

main.py
```python
import datetime
import os
from cf_secure_edge import cf_token


def get_timedelta(str_val = ''):
    if str_val.endswith("m"):
        return datetime.timedelta(minutes=int(str_val[0:-1]))
    if str_val.endswith("h"):
        return datetime.timedelta(hours=int(str_val[0:-1]))
    if str_val.endswith("d"):
        return datetime.timedelta(days=int(str_val[0:-1]))
    return int(str_val)


# Press the green button in the gutter to run the script.
if __name__ == '__main__':
    url = os.environ["URL"]
    key = os.environ["KEY"]
    key_id = os.environ["KEY_ID"]
    exp = os.environ.get("EXP", "24h")
    firstExp = os.environ.get("FIRST_EXP", "5m")
    country = os.environ.get("CO", "")
    region = os.environ.get("REG", "")
    no_session = os.environ.get("NO_SSN", False)
    user_agent = os.environ.get("UA", "")
    referer = os.environ.get("REF", "")

    token_policy = cf_token.TokenPolicy()
    token_policy.expiry = get_timedelta(exp)
    token_policy.first_access_expiry = get_timedelta(firstExp)
    token_policy.session = not no_session
    token_policy.country = len(country) > 0
    token_policy.region = len(region) > 0
    token_policy.headers = []
    if len(user_agent) > 0:
        token_policy.headers.append("user-agent")
    if len(referer) > 0:
        token_policy.headers.append("referer")

    viewer_attrs = cf_token.ViewerAttributes()
    viewer_attrs.country = country
    viewer_attrs.region = region
    viewer_attrs.headers = {
        "user-agent": user_agent,
        "referer": referer,
    }

    cf_token = cf_token.CfToken(secrets={key_id: key})

    url_with_token = cf_token.generate_url(url, key_id, token_policy, viewer_attrs)
    print(url_with_token)
```

```bash
URL=https://your-media-endpoint.com/master.m3u8 \
  KEY_ID=your-key-id KEY=your-key \
  UA="your-user-agent" \
  REF=your-referrer \
  python3 main.py
```
AutoTransferMachine 0.0.4
PT自动转载工具

# Auto Transfer Machine
> AutoTransferMachine转载机 - 为发光发热而生

## :triangular_flag_on_post:功能

* 批量爬取站点指定资源并下载到本地（例：可通过脚本选择爬取影站除禁转、分集外的所有资源）
* 自动从源站抓取转种需要的媒体信息，通过POST达到精确转种
* 自动生成截图（可指定数量与格式）
* 自动生成新的PTGEN与MediaINFO信息

## :warning:注意事项
* 部分有特殊MediaINFO模板的站点，以及对转出有严格要求的站点慎用

## :warning:已适配转出站点

<table>
  <tr>
    <td colspan="6" align="center">:star:已适配</td>
    <td align="center">:construction_worker_man:施工中</td>
  </tr>  
  <tr>
    <td align="center">观众</td>
    <td align="center">CarPT</td> 
    <td align="center">大青虫</td> 
    <td align="center">打胶</td> 
    <td align="center">碟粉</td>     
    <td align="center">咖啡</td>     
    <td align="center">学校</td> <!-- 施工中 -->
  </tr>  
  <tr>
    <td align="center">龙之家</td>
    <td align="center">GTK</td> 
    <td align="center">海胆</td> 
    <td align="center">白兔</td> 
    <td align="center">好大</td>  
    <td align="center">铂金学院</td>    
    <td align="center">阿童木</td> <!-- 施工中 -->
  </tr> 
  <tr>
    <td align="center">自由农场</td>
    <td align="center">杜比</td> 
    <td align="center">红豆饭</td> 
    <td align="center">家园</td> 
    <td align="center">小蚂蚁</td>
    <td align="center">猫</td>     
    <td align="center">普斯特</td> <!-- 施工中 -->
  </tr> 
  <tr>
    <td align="center">明教</td>
    <td align="center">空</td> 
    <td align="center">HDTIME</td> 
    <td align="center">好多油</td> 
    <td align="center">HDVIDEO</td>
    <td align="center">铂金家</td>     
    <td align="center">蝴蝶</td> <!-- 施工中 -->
  </tr> 
  <tr>
    <td align="center">HDZONE</td> 
    <td align="center">大聪明</td> 
    <td align="center">北川</td> 
    <td align="center">冰淇淋</td>
    <td align="center">爱萝莉</td>
    <td align="center">PTLSP</td>
    <td align="center">我堡</td> <!-- 施工中 -->
  </tr> 
  <tr>
    <td align="center">ITZMX</td> 
    <td align="center">开心</td> 
    <td align="center">库非</td> 
    <td align="center">芒果</td>
    <td align="center">馒头</td>
    <td align="center">PTT</td>
    <td align="center">不可说</td> <!-- 施工中 -->
  </tr> 
  <tr>
    <td align="center">南洋</td> 
    <td align="center">OKPT</td> 
    <td align="center">奥申</td> 
    <td align="center">熊猫</td>
    <td align="center">猪猪</td>
    <td align="center">红叶</td>
    <td align="center">烧包</td> <!-- 施工中 -->
  </tr>
  <tr>
    <td align="center">肉丝</td> 
    <td align="center">聆音</td> 
    <td align="center">TCCF</td> 
    <td align="center">你堡</td>
    <td align="center">冬樱</td>
    <td align="center">52PT</td>
    <td align="center">瓷</td> <!-- 施工中 -->
  </tr>
  <tr>
    <td align="center">伊甸园</td> 
    <td align="center">1PTBA</td> 
    <td align="center">朱雀</td> 
    <td align="center">织梦</td>
    <td align="center"></td>
    <td align="center"></td>
    <td align="center"></td> <!-- 施工中 -->
  </tr> 
</table>