semvec/pypi-packages huggingface dataset:
pi3-switch 0.5.2
More advanced workspace switcher for i3.
License: MIT

About
-----

This simple program will move selected i3 workspace to the current output, determined either by cursor position or focused window. Three modes are available - see usage section for more information.

Usage
-----

::

   usage: pi3-switch [-h] [-f] [-p | -m | -s] WORKSPACE_NAME

   Moves selected i3 workspace to the current output (by default determined by
   cursor location) and focuses it.

   positional arguments:
     workspace     name of the i3 workspace

   optional arguments:
     -h, --help    show this help message and exit
     -f, --focus   use focused window instead of cursor position to determine the
                   current output
     -p, --push    moves replaced workspace to the second output (works only if
                   there are two outputs, ignored otherwise)
     -m, --master  same as 'push' but will only move from primary output to the
                   secondary
     -s, --swap    (NOT IMPLEMENTED YET) behaves like xmonad, swaps workspaces if
                   they are on a different output

Installation
------------

Install using `pipsi`_ (recommended) or pip:

::

   pipsi install pi3-switch

Add keybindings to ~/.config/i3/config and reload i3 (remember to modify flags to your liking):

::

   bindsym $mod+1 exec pi3-switch -p 1
   bindsym $mod+2 exec pi3-switch -p 2
   bindsym $mod+3 exec pi3-switch -p 3
   bindsym $mod+4 exec pi3-switch -p 4
   bindsym $mod+5 exec pi3-switch -p 5
   bindsym $mod+6 exec pi3-switch -p 6
   bindsym $mod+7 exec pi3-switch -p 7
   bindsym $mod+8 exec pi3-switch -p 8
   bindsym $mod+9 exec pi3-switch -p 9
   bindsym $mod+0 exec pi3-switch -p 10

Credits
-------

Thanks to Travis Finkenauer for an inspiration (`i3-wk-switch`_) and
Tony Crisci for an easy-to-use i3 python library (`i3ipc-python`_).

.. _pipsi: https://github.com/mitsuhiko/pipsi
.. _i3-wk-switch: https://github.com/tmfink/i3-wk-switch
.. _i3ipc-python: https://github.com/acrisci/i3ipc-python
file-organizer 0.2.3
A file organizer based on file suffixes and user chosen file extensions
License: MIT
Keywords: file,organizer

# File organizer

## Description
A Python file organizer based on optional user defined file extensions.

## Installation

Just run `pip install file-organizer`.

> Python 3.7+ required

## Command line synopsys

```
Usage: organize [OPTIONS] SRC DEST

Options:
  --extensions TEXT       List of extensions to move separated by comma
  --delete / --no-delete  Whether source files must be deleted after they're
                          organized
  -v, --verbose
  --help                  Show this message and exit.
```

## Basic usage example
``` $ organize ~/Downloads ~/Organized```

Executing the above command, will __move__ all files inside `~/Downloads` into separate folders inside `~/Organized` based each file extension.
To __copy__ instead, you can pass the `--no-delete` flag.



### Pull requests are welcome

## TODO

- [ ] Add a dry-run option
- [ ] Improve code
sorm 0.0.1
Simple SQLite3 ORM
License: MIT

# Simple SQLite ORM - 'sORM'

Allows to use Python objects instead of SQLite statements.

## Installation

You can install 'sORM' with these commands:
```bash
    $ mkdir <installation dir>
    $ cd /<installation dir>
    $ git clone git://github.com/max-kim/sorm.git
    $ cd sorm
```

## Requirements

- Python 3.6 (or over)

## Usage

#### How to make the connection and create the tables:
```python
    from sorm import create_connection
    from sorm import IntType, FloatType, StrType, BytesType, ForeignKey, Base, Relationship
    from sorm import Base, ForeignKey, Relationship

    connection = create_connection('sorm_test.db', echo=True)


    class Group(Base):
        __tablename__ = 'groups'

        id = IntType(__tablename__, 'id', primary_key=True)
        group_name = StrType(__tablename__, 'group_name', nullable=False)


    class User(Base):
        __tablename__ = 'users'

        id = IntType(__tablename__, 'id', primary_key=True)
        user_name = StrType(__tablename__, 'user_name', nullable=False)
        group_id = IntType(__tablename__, 'group_id', ForeignKey(Group, 'id'))

        group = Relationship(group_id)

    connection = create_connection('sorm_test.db', echo=True)
    connection.create_table(Group, User)

    # Also you can use next syntax to create table:
    # <<< Group.create(connection)
```
**Important:** For the best way, use 'id' attribute as primary key within your every tables.

Use 'echo=True' as 'create_connection' parameter to show every sql queries.

#### How to insert data:
```python
    group = Group(group_name='Admins')
    connection.add(group)
    connection.add(Group(**{'group_name': 'Users'}))

    connection.add(User(**{'user_name': 'Max', 'group_id': None}))
    connection.add(User(**{'user_name': 'Alex', 'group_id': None}))
```
The field 'id' will be added and filled automatically.

#### How to select data:
```python
    groups = connection.query(Group).order_by(Group.id).all()
```
The result returns as tuple of objects:
```python
    print(type(group)) # >>> <class 'tuple'>
    for group in groups:
        print('The group id = {}, group name is {}.'.format(group.id, group.group_name))
```

When you call 'first()' method, you get an object or 'None' if the query does not match any data.
```python
    admin_group = connection.query(Group).where((Group.group_name, '=', 'Admins')).first()
```

#### How to make an update:
```python
    if admin_group:
        user = connection.update(User).where((User.user_name, '=', 'Alex'),
                                             (User.id, '=', 2)).value(group_id=admin_group.id)
        print(user)
```
Update query returns tuple of objects any time or empty tuple if conditions does not fit anything.

#### Deletion the data:
```python
    connection.delete(Group).where((Group.id, '>=', 3))
```
or:
```python
    some_user = User(id=5)
    connection.delete(some_user)

    # connection.delete(some_user) == connection.delete(User).where((User.id, '=', 5))
```
The deletion statement returns 'None' any time.

## Other

This library is a homewokr for OTUS Python web-dev.