semvec/pypi-packages huggingface dataset:
mftoolbox 5.0.5
A set of tools to support my MF2 and MagicFII projects
Requires Python: >=3.5

# mftoolbox

Package created to support my **MF2** project development.

Functions:

* encoding(): returns the proper encoding for handling config files with configparser. It's based on the based on the operating system:
    * UTF-16 for Windows;
    * UTF-8 for Mac.

Classes:

* Build: automatically controls build number based on changes made to the file;
* UltimaCotacaoDolar: gets the last available BRL/USD exchange rate from Brazilian's Central Bank;
* Proventos: works with dividends data;
* Timestamp: formats execution start time information
    * self.str_yyyymmdd: now() formatted as YYYYMMDD
    * str_hhmmss: now() formatted as HHMMSS
    * dtt_timestamp: now() as timestamp
    * dtt_now: now() as datetime
* CotacaoDolarData: gets USD/BRL exchange rate for a specific date
    * Arguments:
        * Date: string with date formatted as DD/MM/YYYY
    * Returns:
        * self.valor: float of the exchange rate for the specific date
* CotacaoDolarHistorico: gets a list of USD/BRL exchange rate for a range of dates
    * Arguments:
        * Start Date: string with date formatted as DD/MM/YYYY
        * End Date: string with date formatted as DD/MM/YYYY
    * Returns:
        * self.cotacoes: list of tuples in the format [Date, Exchange Rate]
        * self.itens: total itens in the list
 * FII: colects data for Brazilian real estate funds
    * Arguments:
        * list that will be populated with funds data
    * Returns:
        * populated list
        

# Version history

3.0.1
* Included parameter to limit the number of FIIs fetched. This will be used for testing the full MagicFII program

3.0.0
* Released the FII module to colect data for Brazilian real estate funds

2.3.7
* Changed from a single module ('mftoolbox') containing all classes and functions to a multi-module approach
* Changed internal imports to hide objects that don't need to be exposed (import xxx as _xxx)
* implemented error handling to cotacaodolar module

2.3.0 - 2.3.6
* perfecting the process of package generation. No changes to code
synapse-email-account-validity 0.3
An account validity module for Synapse using email
Requires Python: >=3.6

# Synapse email account validity

A Synapse plugin module to manage account validity using validation emails.

This module requires:

* Synapse >= 1.34.0
* sqlite3 >= 3.24.0 (if using SQLite with Synapse)

## Installation

Thi plugin can be installed via PyPI:

```
pip install synapse-email-account-validity
```

## Config

Add the following in your Synapse config under `account_validity`:

```yaml
  - module: email_account_validity.EmailAccountValidity
    config:
      # The maximum amount of time an account can stay valid for without being renewed.
      period: 6w
      # How long before an account expires should Synapse send it a renewal email.
      renew_at: 1w
```

Also under the HTTP client `listener`, configure an `additional_resource` as per below:

```yaml
    additional_resources:
      "/_synapse/client/email_account_validity":
        module: email_account_validity.EmailAccountValidityServlet
        config:
          # The maximum amount of time an account can stay valid for without being
          # renewed.
          period: 6w
```

The syntax for durations is the same as in the rest of Synapse's configuration file.

If they are not already there, copy the [templates](/email_account_validity/templates)
into Synapse's templates directory.

## Routes

This plugin exposes three HTTP routes to manage account validity:

* `POST /_synapse/client/email_account_validity/send_mail`, which any registered user can
  hit with an access token to request a renewal email to be sent to their email addresses.
* `GET /_synapse/client/email_account_validity/renew`, which requires a `token` query
  parameter containing the latest token sent via email to the user, which renews the
  account associated with the token.
* `POST /_synapse/client/email_account_validity/admin`, which any server admin can use to
  manage the account validity of any registered user. It takes a JSON body with the
  following keys:
    * `user_id` (string, required): The Matrix ID of the user to update.
    * `expiration_ts` (integer, optional): The new expiration timestamp for this user, in
      milliseconds. If no token is provided, a value corresponding to `now + period` is
      used.
    * `enable_renewal_emails` (boolean, optional): Whether to allow renewal emails to be
      sent to this user.

The two first routes need to be reachable by the end users for this feature to work as
intended.

## Development and Testing

This repository uses `tox` to run tests.

### Tests

This repository uses `unittest` to run the tests located in the `tests`
directory. They can be ran with `tox -e tests`.

### Making a release

```
git tag vX.Y
python3 setup.py sdist
twine upload dist/synapse-email-account-validity-X.Y.tar.gz
git push origin vX.Y
```