semvec/pypi-packages huggingface dataset:
bevy.events 0.1.4
An event dispatch framework designed to be used with the Bevy dependency injection framework.
License: MIT
Requires Python: >=3.7,<4.0
Keywords: dependency,injection,annotations,types

# Bevy.Events
Bevy.Events is an events system designed to be used with the [Bevy](https://github.com/ZechCodes/Bevy) dependency injection framework. It uses [Gully](https://github.com/ZechCodes/Gully) for creating observable streams of event objects.

## Installation
```shell script
pip install bevy.events
```

**Documentation**

Bevy.Events is incredibly straightforward. You can use it as an annotation type on any injectable class.
```python
@bevy.injectable
class Example:
    events: bevy.events.EventDispatch
    ...
```
It is also possible to have multiple event dispatchers in the same Bevy context by giving them names. 
```python
@bevy.injectable
class Example:
    events: bevy.events.EventDispatch["my-event-dispatch"]
    ...
```
To send an event use the `dispatch` on the event dispatch and pass it the event name to dispatch and all the args to pass to the watchers.
```python
@bevy.injectable
class Example:
    events: bevy.events.EventDispatch
    ...

    async def recieved_message(self, message):
        await self.dispatch("message-received", message)
```
To register a watcher just call `watch` on the event dispatch and pass it an event name to `watch` for and a coroutine callback. The callback will be passed all args that were given to the `dispatch` method.
```python
@bevy.injectable
class Example:
    events: bevy.events.EventDispatch
    def __init__(self):
        self.events.watch("message-received", self.on_message_received)
    async def on_message_received(self, message):
        ...
```
`watch` returns a [Gully observer](https://github.com/ZechCodes/Gully#gullyobservablegullygully) so that the event watcher can be enabled or disabled as needed.

The event dispatchers will be shared by all class instances in the Bevy context. Events dispatched on a named dispatcher will only be sent to watchers of that event dispatcher. Any class in the context can access the same same event dispatcher just by giving the annotation the same name.
awca 0.0.3.2
A toolkit for making ancient world citation analysis, text summarization, paraphrasing and OCR for PDF to CSV
License: MIT
Requires Python: >=3.6

# awca-tools
 tools and functions for AWCA

## Sample Usage
### from awca import summarization
summarization.summarize()
Input: Text
Output Text

### from awca import paraphrasing
paraphrasing.paraphrase()
Input: Text
Output: Text

### from awca import ocr
ocr.populate_csv()
Input: a list of files
Output: a csv file
mariantranslate 0.1.8
Simple translator using Marian NMT.
License: MIT
Requires Python: >=3.6.0
Keywords: translation,translator,translate,language,marian,nmt

# mariantranslate
Simple translator using Marian NMT.

## installation
```bash
$ pip install mariantranslate
```

or install from source:

```
$ git clone https://github.com/galuhsahid/mariantranslate
$ cd mariantranslate
$ make install_src
```

## usage
View the list of available languages [here](https://huggingface.co/Helsinki-NLP).

```python
from mariantranslate import Translator

lang_from = "en" # source language
lang_to = "id" # target language

en_id_translator = Translator(lang_from, lang_to)
en_id_translator.translate("Due to the limited vegetation cover of the Faroe Islands, it is relatively easy to follow the history of geology.")

>>> Karena tumbuhan terbatas menutupi Kepulauan Faroe, relatif mudah untuk mengikuti sejarah geologi.
```