semvec/pypi-packages huggingface dataset:
simple-deployer 1.0.0
A simple deployer cmd tool
Requires Python: >=3.6

# Python application deployer

This command line script exists for fast deployment to remote server.
Was mostly created for test purposes and might have some issues.

## Used languages/packages

Python3.6 and [click](https://click.palletsprojects.com/en/7.x/).
This script uses `ssh`, `scp`, `zip` and `unzip` commands inside.

## Installation and usage

To install simply run `pip install simple_deployer`

You can also install it from git: `pip install git+https://github.com/velykanov/simple_deployer.git`

To deploy your application to the server simply run `py-deploy -t username@host:/some/dir/`.
This command would deploy current directory to remote server.

Here's the full list of options:
```shell script
-i, --identity-file TEXT  SSH identity file
-P, --port TEXT           SSH target port
-s, --source TEXT         Source  (default: '.')
-t, --target TEXT         Target  [required]
-e, --exclude TEXT        Dirs names to exclude  (default: ['tests', '.git', '__pycache__'])
-v, --verbose
--version                 Show the version and exit.
--help                    Show this message and exit.
```

### Please note!

This tool won't work if your python versions are mismatched
(for instance your app is written using Python3.8 including
some specific features and you're running this tool using Python3.6).
sla-calculator 1.0.0
A python module that will calculate the sla time based on working hours and holidays.
Requires Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*

# SLA Calculator

## Installation
```
pip install sla-calculator
```
## Usage
To use this calculator, you must provide a starting time, the open time 
for business, the closing time for business, the country whose holidays
you observe, and the sla time in hours.  The function will then take
into account all holidays and weekends as none working hours, and return 
a pendulum object of the time the sla needs to be met by. The following
example will provide you with an SLA time 4 working hours from
12/10/2019 1:02:03 UTC
```python
from sla_calculator import SLA_Calculator

sla_calc = SLA_Calculator()

sla_time = sla_calc.calculate(start_time="2019-12-10T01:02:03Z",
                              open_hour=9,
                              close_hour=17,
                              country_name="US",
                              sla_in_hours=4)
print(sla_time.to_iso8601_string())
```

## Locale Specification
You can also specify the province or state that you are in to get a more
specific set of holidays:
```python
sla_time = sla_calc.calculate(start_time="2019-12-10T01:02:03Z",
                              open_hour=9,
                              close_hour=17,
                              country_name="US",
                              sla_in_hours=4,
                              state="CO")
```
Or:
```python
sla_time = sla_calc.calculate(start_time="2019-12-10T01:02:03Z",
                              open_hour=9,
                              close_hour=17,
                              country_name="Switzerland",
                              sla_in_hours=4,
                              province="Zurich")
```

## Run tests
Test are written for the pytest framework. Install it with:

    $ poetry install pytest
    
Run the tests with:

    $ poetry run pytest
sql-ninja 0.2.1
SQL + Jinja Templates Done Right™
Requires Python: >=3.6

# Overview

SQL + Jinja Done Right™

This project is a thin wrapper around [Jinja](https://jinja.palletsprojects.com/) templates to help
manage the generation of SQL.

In your project create a directory name `sql/templates` to manage your SQL files:

```sh
.
└── sql
    └── templates
        ├── foo.sql
        └── bar.sql
```

Templates are also searched from the current working directory and will have priority over
files in `sql/templates`.

An example `foo.sql` might be:

```sql
SELECT '{{msg}}' as message
```

Then to access the SQL template use the following Python snippet:

```python
from sqlninja import engine as sqlninja

query = sqlninja.render("foo.sql", msg="Hello World")
```

The resulting `query` would be:
```sql
SELECT 'Hello World' as message
```

In `bar.sql` lets try including `foo.sql`:

```sql
SELECT * FROM ({% include 'foo.sql' %}) as t1
```

The rendered SQL would be:
```sql
SELECT * FROM (SELECT 'Hello World' as message) as t1
```

## Command Line Interface

The Python interface makes sense at runtime, but for development, the CLI is more convenient.

The library installs a CLI script: `sql`

```sh
$ sql --help
Usage: sql [OPTIONS] SRC

Options:
--template_path TEXT  Base directory where SQL templates are located.
Defaults to `sql/templates`

--help                Show this message and exit.
```

To see the resulting SQL we can try:

```sh
sql foo.sql msg='Hello World'

# => SELECT 'Hello World' as message
```

## Installation

```sh
pip install sql-ninja
```

Or add to `requirements.txt`

```txt
sql-ninja
```

Or add to `setup.py`

```python
setup(
    install_requires=[
        'sql-ninja',
    ]
```

## Docker

Docker users can pull directly from `ddrscott/sql-ninja`

```sh
docker run --rm -v $PWD:/app -w /app ddrscott/sql-ninja sample.sql
#            ^   ^            ^      ^                  ^
#            |   |            |      |                  |
#            |   |            |      |                  + the template
#            |   |            |      |
#            |   |            |      + the image
#            |   |            |
#            |   |            + start in /app path
#            |   |            
#            |   + volume mount current path to /app
#            |
#            + remove container when complete
```

## Contributing

Bug reports and pull requests are welcome on GitHub at
https://github.com/ddrscott/sql-ninja


## License

The gem is available as open-source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
bwi 0.1.2
Package to add bwi methods into your project
Requires Python: >=3.0

# BWI-lib

_python client for BWI interactions_

## Usage

### Instantiate a client

```python
import bwi


client = bwi.Client(api_key='xxxxxxxxxxxxxxxx', workflow='shop')
```

### Manipulate your logs

```python
# provide step duration
with client.Step('fetch client information') as bwi:
    bwi.logger.info('found client with user id %d', 18)

```

### Metric management

```python
# manipulate metrics
client.Step('validate order')
# Your business-oriented code goes here
# ...
total_paid = 220

# increment the income metric for this step
bwi.metrics.inc('income', total_paid)
```

### Error-handling

```python
# report any unknown exception to the bwi handler
try:
    # Your business-oriented code goes here
except Exception as err:
    bwi.handler.catch(err)
    # the error is now available for this specific step
```

### Mark a step as (un)succesful

```python
step = bwi.Step('process order')

# Your business-oriented code goes here
step.success()

# other scenario, where thing go bad
step.failed()
```
karthick-zapr-athena-client 0.1
It is a python library to run the presto query on the AWS Athena.

ZAPR AWS Athena Client
=======================================
ZAPR AWS athena client is a python library to run the presto query on the AWS Athena.

At Zapr we have the largest repository of offline media consumption and we try to answer some of the hardest questions of brands, broadcasters and marketers, on top of this data. To make all this happen we have churn TBs of data in a somewhat interactive manner. AWS Athena comes to rescue to help the team achieve this. We are using this client as a middleware to submit the queries to Athena, as Athena has few shortcomings that we have tried to solve through this client.
Athena lacks in :

	1. Submitting multiple queries at a time.
	2. Insert overwrite is not supported in Athena.
	3. Dropping of table doesn't delete the data, only schema is dropped.
Another benefit that we achieve using this client is that we can integrate Athena easily to all our existing data pipelines built on oozie, airflow. 

# Supported Features

* submit the multiple queries from single file.
* insert overwrite.
* drop table (drop the table and delete the data as well).
* submitting the query by using aws athena workgroup. so we can track the cost of the query.

# Quick Start

## Prerequisite

* boto3
* configparser
* s3transfer

## Usage


### Syntax
```
python athena_client.py config_file_location workgroup_name query_file_location  input_macro1 input_macro2 ...
```

### Install dependencies
```
pip install -r requirements.txt
```
### Example - 1

```
python athena_client.py config.ini workgroup_testing_team sample-query-file.sql start_date=2020-09-25 end_date=2020-09-25
```

### Example - 2

```
python athena_client.py s3://sampe-bucket/sample-prefix/project-1/config.ini workgroup_testing_team s3://sampe-bucket/sample-prefix/project-1/sample-query-file.sql start_date=2020-09-25 end_date=2020-09-25
```

### Via PIP

```
pip install zapr-athena-client
zapr-athena-client config.ini workgroup_testing_team sample-query-file.sql start_date=2020-09-25 end_date=2020-09-25
```

### Sample Query 
```
create table sample_db.${table_prefix}_username
WITH (external_location = 's3://sample_db/${table_prefix}_username/',format = 'ORC') as
    select username
    from raw_db.users
    where date between '${start_date}' and '${end_date}';
```

### Disable Insert Overwrite and drop data
This athena client supports insert overwrite table and delete data if you are executing drop table query by default. We can add the following configurations to disable these features.

```
ENABLE_INSERT_OVERWRITE = False
ENABLE_EXTERNAL_TABLE_DROP = False
```    

Contact
-------
For any features or bugs, please raise it in issues section

If anything else, get in touch with us at opensource@zapr.in