semvec/pypi-packages huggingface dataset:
litestar-svcs 0.1.2
A plugin for Litestar to integrate `svcs`.
License: MIT
Requires Python: >=3.8

# Litestar Svcs

A plugin to integrate [litestar](https://github.com/litestar-org/litestar) with [svcs](https://github.com/hynek/svcs/).

# Basic Usage

```python
from litestar import Litestar
from litestar import get
from litestar_svcs import SvcsPlugin, SvcsPluginConfig

from svcs import Container, Registry

@get("/", sync_to_thread=False)
def get_user(svcs_container: Container) -> int:
  return svcs_container.get(int)


registry = Registry()
registry.register_factory(int, lambda: 10)

svcs_plugin_config = SvcsPluginConfig(registry=registry)
svcs_plugin = SvcsPlugin(svcs_plugin_config)

app = Litestar([get_user], plugins=[svcs_plugin])
```

# Configuring

- You can pass in the `registry` instance, as in the example, to the config or you can give it a callable (sync or async) and it will be used to create the registry when the app is starting.
- You can give a custom name to the name of the kwarg for injecting the containers by setting a different value for `container_dependency_key` (default is `svcs_container`).

  NOTE: You *cannot* configure the name of the kwarg which injects the registry (the kwarg name is `svcs_registry`).
etl-helper-talenttech 1.7.1
TopMind ETL helper
License: MIT
Requires Python: >=3.6

ETL table converter and creator
==========

The Python Toolkit for converting table from one database to another

Databases types
-------------

Supported databases. You have to use short name of database
short_name:type of database 
* ch:clickhouse
* pg:postgresql
* mysql:mysql
* vertica:vertica
* exasol:exasol


Supported database conversions
-------------
* mysql to pg
* mysql to vertica
* mysql to exasol
* ch to vertica
* pg to vertica


Credentials
-------------
```sh
sql_credentials = {
    "pg": {
        "database": os.getenv("PG_DATABASE"),
        "schema": os.getenv("PG_SCHEMA"),
        "user": os.getenv("PG_USER"),
        "host": os.getenv("PG_HOST"),
        "port": os.getenv("PG_PORT"),
        "password": os.getenv("PG_PASSWORD"),
        #additional params bellow (optional) 
        "executemany_mode": "values",
        "executemany_values_page_size": 10000,
        "executemany_batch_page_size": 500,
    },
    "ch": {
        "database": os.getenv("CH_DATABASE"),
        "user": os.getenv("CH_USER"),
        "host": os.getenv("CH_HOST"),
        "port": os.getenv("CH_PORT"),
        "password": os.getenv("CH_PASSWORD"),
        #additional params bellow (optional) 
        "connect_args": {
            "alt_hosts": "{},{}:{}".format(
                os.getenv("CH_HOST_B"), os.getenv("CH_HOST_C"), os.getenv("CH_PORT")
            )
        },
    },
    "vertica": {
        "database": os.getenv("VERTICA_DATABASE"),
        "schema": os.getenv("VERTICA_SCHEMA"),
        "user": os.getenv("VERTICA_USER"),
        "host": os.getenv("VERTICA_HOST"),
        "port": os.getenv("VERTICA_PORT"),
        "password": os.getenv("VERTICA_PASSWORD"),
        #additional params bellow (optional) 
        "connect_args": {
            "connection_load_balance": True,
            "backup_server_node": json.loads(os.getenv("VERTICA_CONFIGS"))[
                "backup_server_node"
            ],
        },
    },
    "mysql": {
        "database": os.getenv("MYSQL_DATABASE"),
        "user": os.getenv("MYSQL_USER"),
        "host": os.getenv("MYSQL_HOST"),
        "port": os.getenv("MYSQL_PORT"),
        "password": os.getenv("MYSQL_PASSWORD"),
    },
}
```

Usage
```sh
pip3 install etl-helper-talenttech
```

```python
import os
from converter.fields_converter import FieldsConverter


from_db = "mysql"
to_db = "vertica"
  
tables = ["users", "user_to_mc"]
converter = FieldsConverter(sql_credentials, from_db, to_db, tables=tables, advanced_features=[0, 1])
res = converter.create_list_of_tables(tables, to_create=True, dir_ddl=None)
fields_from = converter.db_worker_from.get_columns(tables[0])
fields_to = converter.db_worker_to.get_columns(tables[0])
print(fields_from)
print(fields_to)
simopt 0.4.0
SIMple OPTion parser
License: MIT
Keywords: simple option parser

# simopt, the SIMple OPTion parser

Simopt is a lightweight module for parsing command line options in python programs.
The options can be written in a separate file or at the top of a script. They are 
(currently) written in a list of tuples, with each entry corresponding to an option
consisting of 

- int: the option level (allowing differentiating help levels)
- str: the option name (command line)
- str: the option target (option class attribute)
- class: the option unit type (parser)
- int: the number of parameters for the option
- object: the default value (None if no default)
- int: flags (MULTI, MANDATORY, ...)
- str: description (help text)

String items in the option list are part of the help and allow sectioning 
options.