semvec/pypi-packages huggingface dataset:
nimformat 0.1.3
Faster keyword string substitution for Python
License: MIT
Keywords: string

# nimformat

The nimformat library is the result of an experiment in using the excellent nimpy module, for the awesome Nim programming language, to create a test library, for Python. The goal was to learn some about Nim, nimpy, creating native Python modules, and to see what, if any, speed boosts could be realized.

The `nim_sub()` function is a rudimentary implementation of string substitution in a similar way to how Python accepts a dictionary for its `string.format()`.

The Nim native Python library can be built by issuing the following command.

`nim c --threads:on --app:lib --out:nimformat.pyd --tlsEmulation:off nimformat.nim`

NOTE: This was done using the latest development version of Nim, which is 0.19.9 at the time of this writing.

Simple benchmarks with Python's `timeit` module yield the following results. See `test_nimformat.py` for more details.
```
Pure Python time                       : 1.7126781147680623e-05
Pure Python [no locals()] time         : 1.8929600215857533e-05
Nim dylib time                         : 0.2829040771053697
Nim dylib [no locals()] time           : 0.0016501803870713205
Nim dylib sub_multi time               : 0.29930432216857517
Nim dylib sub_multi [no locals()] time : 0.0007848272343464746
```


Example 1:
```
import nimformat

variable1 = 'string'
variable2 = 'contains'

dictSub = dict(locals())
dictSub = {str(key): str(dictSub[key]) for key in dictSub.keys() if '__' not in str(key)}

strWithSubstitutions = """
This is a {variable1} which spans
multiple lines and {variable2} multiple
substitutions.
"""

strSubstituted = nimformat.nim_sub(strWithSubstitutions, dictSub)
```

Example 2:
```
import nimformat

dictSub = {
  'variable1': 'string',
  'variable2': 'contains'
}

strWithSubstitutions = """
This is a {variable1} which spans
multiple lines and {variable2} multiple
substitutions.
"""

strSubstituted = nimformat.nim_sub(strWithSubstitutions, dictSub)
```
pymongoback 1.0.0
PyMongo Back is a simple Python library designed to help you create MongoDB Backups from both local and remote servers.
License: MIT
Keywords: tools sysadmin backup mongodb mongodump

﻿# PyMongoBack

**PyMongo** Back is a simple Python library designed to help you create MongoDB Backups from both local and remote servers.


## Install

You can easily install it using the following command:

    sudo pip3 install pymongoback

> In the server that is going to execute the script, it will be necessary to have installed **MongoDB** or  **Mongodb Tools**. Since you need to have installed mongodump.

## Usage

Starting to use PyMongoBack is very simple. You only need to import the library and create an object PyMongoBackup() with the parameters that you prefer.

|Param|Type|Description|
|--|--|--|
|username|str|Username for login MongoDB. Default None.|
|password|str|Password for login MongoDB. Default None.|
|host|str|IP address of the MongoDB server. Default 'localhost'.|
|days_backup|int|Maximum days that are saved backup. Default None (always save).|
|path_backup|str|Path where the backup is saved. Default './BackupMongo'.|
|log|bool|Indicates if the output is written to a log file. Default False.|
|path_log|str|Path where the log is saved. Default './BackupMongo/log'.|
|prefix|str|Indicates the prefix with which the backup will be saved. Default 'back_'.|
|datetime_format|str|Indicates the date format to name the backup. Default '%Y-%m-%d_%H-%M'.|

> Example of name backup file: back_2019-03-09_12-21.zip

|Methods|Description|Arguments|
|--|--|--|
|create_full_backup()|Create a backup of all databases||
|create_backup('db1')|Create a backup of a database|Name of database|
|create_multidb_backup(['db1','db2'])|Create a backup of several databases|List with the databases to make the backup|


### Examples

Backup of all databases on the local server.
 
    import pymongoback
    
    back = pymongoback.PyMongoBackup()  
    back.create_full_backup()

Backup of a database on the remote server and changing the prefix.

    import pymongoback  
    
    backone = pymongoback.PyMongoBackup(username='Rafa', password='pass1234',host='192.168.1.221', days_backup=5, prefix='backremote_')  
    backone.create_backup('db1')

Backup of two databases by changing the path where they are saved and log file activated.

    import pymongoback  
    
    backmulti = pymongoback.PyMongoBackup(username='Rafa', password='pass1234', path_backup="/var/BackupMongo", log=True, path_log='/var/log/BackupMongo/log', prefix='multiback_')
    
    databases = ['db1','db2']
    backmulti.create_multidb_backup(databases)
django-media-pil 1.0.0
Simple widget for image manipulations by pillow in the Django Admin
License: MIT
Keywords: django,pillow,mediamanager

# DjangoMediaPil

1. What it does
3. Installation

## What it does
Privieds custom widget and field to handle image in django.


## Installation

To install the package by `pip` run following command

```sh
pip install django-media-pil
```

or

```sh
$ pip install git+https://github.com/giorgi94/django-media-pil
```
aiospotipy 0.0.2
an API wrapper for Spotify
License: MIT
Requires Python: >=3.5.3

# Aiospotipy
aiospotipy is an API wrapper for Spotify written in python.

This is based on asyncio and spotipy.


# Installing
This package can be installed in `pip`:
```commandline
pip install aiospotipy
```
Of course, you can install the package manually after cloning the repository:
```commandline
git clone https://github.com/sizumita/aiospotipy.git
cd aiospotipy
python setup.py install
```

# Quick Example
```python
from aiospotipy import Spotify

auth = "xxxxxxxxxxxxxx"
spotify = Spotify(auth=auth)


# Search for an artist by its name
search_results = await spotify.search_artist(q="kalafina")

```
```python
from aiospotipy import Spotify
from aiospotipy.oauth2 import SpotifyCredentials

spotify = Spotify(SpotifyCredentials("CLIENT_ID", "CLIENT_SECRET"))


# Search for an track by its id
search_results = await spotify.search(q='3n3Ppam7vgaVa1iaRUc9Lp', _type='track')

# Show my playlists:
my_playlists = await spotify.me.playlists()

```

# License
This project is licensed under the MIT Licence.
invalid-scraper 0.1.0rc2
A tool for finding rov-invalid received routes.
License: MIT

[![PyPI](https://img.shields.io/pypi/v/invalid-scraper.svg)](https://pypi.python.org/pypi/invalid-scraper)
[![Build Status](https://travis-ci.com/wolcomm/invalid-scraper.svg?branch=master)](https://travis-ci.com/wolcomm/invalid-scraper)
[![codecov](https://codecov.io/gh/wolcomm/invalid-scraper/branch/master/graph/badge.svg)](https://codecov.io/gh/wolcomm/invalid-scraper)

# invalid-scraper

Iterate through a list of Cisco IOS routers (`invalid_scraper/data/hosts.yml`)
and find RPKI Invalid routes learnt from neighbors.

## Usage

```
usage: invalid-scraper [-h] [--domain DOMAIN] [--username USERNAME]

optional arguments:
  -h, --help            show this help message and exit
  --domain DOMAIN, -d DOMAIN
  --username USERNAME, -u USERNAME
```