semvec/pypi-packages huggingface dataset:
botbuilder-sangam-cognitive-text-translate 0.4.0
Microsoft Bot Builder sangam Middleware test recognizer
License: MIT
Keywords: botbuilder bots ai botframework middleware text translate

# Translate Middleware

The Translate Middleware library is a use to translate text using cognitive services translator.<BR>
Cognitive Services Translator is a cloud-based machine translation service you can to translate text in with a simple REST API call

## Installing

    pip install botbuilder-sangam-cognitive-text-translate

## Usage

All middleware is created and used in the same way. For example, import the `TranslateMiddleware` class from the package, and add it to your bot adapter:

    from botbuilder.sangam.cognitive.text.translate import TranslateMiddleware , TranslateSettings

    translate_settings = TranslateSettings()
    translate_settings.subscription_key = ''
    translate_settings.from_lang = 'en'
    translate_settings.to_lang = ['de','it','ta']
    translate_settings.subscription_region = ''

    adapter.use(TranslateMiddleware(translate_settings));

When used, the `turn_state` on the `TurnContext` will have a property named `translate_response`, which will be an return an TranslateResponse object.

Supported middleware classes include:

| Class | Property/Properties on `turn_state` |
| ---- | ----------- |
| `TranslateMiddleware` | `context.turn_state.get("translate_response")` |

# TranslateService
TranslateService is use to translate text using cognitive services translator without Middleware.
    
    from botbuilder.sangam.cognitive.text.translate import TranslateService , TranslateSettings ,TranslateResponse

    translate_settings = TranslateSettings()
    translate_settings.subscription_key = ''
    translate_settings.from_lang = 'en'
    translate_settings.to_lang = ['de','it','ta']
    translate_settings.subscription_region = ''
    
    
    //call the translate service 
    
    service = TranslateService(translate_settings)
    response = service.translate_text('hello')
eshop-invoice 1.0.1
Create PDF invoices for Eshop from YAML files.
License: MIT


<div align="center">
    <img alt="eshop-invoice" src="">
    <h1>eshop-invoice generator</h1>
    <img alt="License" src="">
    <img alt="Travis Build Status" src="">
    <img alt="PyPI Package" src="">
</div>


Generate invoices using python, weasyprint and yaml.

<div align="center">
    <h5>Sample Invoice</h5>
</div>

## Usage
```
usage: eshop-invoice [-h] [--template TEMPLATE] [--defaults-file DEFAULTS_FILE]
                   --invoice-data-file INVOICE_DATA_FILE --out-file OUT_FILE
                   [--locale LOCALE]

Create PDF invoices from YAML files.

```

```shell
./eshop-invoice --invoice-data-file invoice.yml --template documents/invoice/template --out-file out.pdf
```
<table style="width: 100%;">
    <tbody>
        <tr>
            <td><code>~/.default-invoice-data.yml</code></td>
            <td><code>invoice.yml</code></td>
        </tr>
        <tr>
            <td class="highlight highlight-source-yaml">
<pre><code>
currency: â‚¬
from:
  name: Kids Eshop
  address:
    street: Dorse Point
    postal_code: "01337"
    city: Dublin
</code></pre></td>
            <td class="highlight highlight-source-yaml">
<pre><code>
to:
  name: Customer Ec2
  customer_id: 10004
  address:
    street: Dorse Point 4
    postal_code: "042424"
    city: Dublin
tax_rate: 19
invoice:
  number: R10006
  date: 16.12.2021
  pay_until_date: 22.12.2021
positions:
  - net_price: 215
    amount: 1
    text: |
      Server
      Windows Server
      Monat 08.2021
  - net_price: 215
    amount: 2
    text: |
      Have a Nice Day
</code></pre></td>
        </tr>
    </tbody>
</table>