semvec/pypi-packages huggingface dataset:
dictkit 0.1.6
Utility data structures with simple but powerful features.

# DictKit

A Python package that provides utility data structures with simple but powerful
features, with a focus on flexibility and user experience.

## UtilDict

A feature-enriched dictionary.

- Access items with **dot notation**.
- **Flexible subscripting**:
    - Get multiple items at once.
    - Set multiple items or the same value to multiple items at once.
- **Add items** without mutating - return an updated copy
- **Drop items** without mutating - return a filtered copy
- Accepts a **variety of argument types** at creation.
- Displays in **nested format** when printed.
- Easy **conversion to json** format with `.json()`

### Examples

```python
from dictkit import UtilDict

# Like a dictionary...
ud = UtilDict(a=1, b=2, c=3)
print(ud)  # {'a': 1, 'b': 2, 'c': 3}

# ... but can be initialized from a variety of types
ud = UtilDict({"a": 1}, [("b", 2)], c=3)
print(ud)  # {'a': 1, 'b': 2, 'c': 3}

# Supports dot notation access
print(ud['a'])  # 1
print(ud.a)  # 1

# Get multiple items at once
selected_items = ud[["a", "c"]]
print(selected_items)  # {'a': 1, 'c': 3}

# Set multiple items at once
ud[["a", "c"]] = 10, 30
print(ud)  # {'a': 10, 'b': 2, 'c': 30}

# Set the same value to multiple keys at once
ud[["a", "c"]] = 99
print(ud)  # {'a': 99, 'b': 2, 'c': 99}

# Add items from a variety of types
ud2 = ud.add({"c": 3}, ("d", 4), e=5)
print(ud2)  # {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5}

# Add items from a 2-column dataframe
import pandas as pd
ud = UtilDict(a=1, b=2)
df = pd.DataFrame({"key": ["c", "d"], "value": [3, 4]})
ud2 = ud.add(df)
print(ud2)  # {'a': 1, 'b': 2, 'c': 3, 'd': 4}

# Drop multiple items at once
>>> ud3 = ud2.drop("a", "c")
>>> print(ud3)  # {'b': 2, 'd': 4}
```

---

<br>

## `render()`

> Somehow, this tool does not yet exist from any popular libraries.

### Represents iterables in nested **JSON _structure_**, but with **Python _formatting_**.

```py
>>> from dictkit.render import render
>>> dct = {'a':1, 'b': {'c':3}, 'list': [int,'b']}
>>> s = render(dct)
>>> s
{
   'a': 1,
   'b': {
      'c': 3
   },
   'list': [
      <class 'int'>,
      'b'
   ]
}
```

### It handles multiline-formatted strings (like dataframes) elegantly, maintaining their original appearance.

```py
>>> from pandas import DataFrame
>>> df = DataFrame([[1, 2, 3], [4, 55, 6]],
...                columns=["ONE", "TWO", "THREE"])
>>> fmt_str = '''|------|
... |      |
... |------|'''
>>> dct = {
...     "key": "value",
...     "formatted string": fmt_str,
...     "nested dct": {
...         "x": "y",
...         "dataframe": df,
...         "a": "b",
...         "formatted string": fmt_str
...     },
...     "lst": ['a', 'b'],
...     "tple": ('a','b')
... }
>>> render(dct, quote=False)
{
   key: value,
   formatted string:
      |------|
      |      |
      |------|,
   nested dct: {
      x: y,
      dataframe:
            ONE  TWO  THREE
         0    1    2      3
         1    4   55      6,
      a: b,
      formatted string:
         |------|
         |      |
         |------|
   },
   lst: [
      a,
      b
   ],
   tple: (
      a,
      b
   )
}
```
fling-cli 0.1.7
Side Project Management from the command line
Requires Python: >=3.9,<4.0

# Fling
## Fling is a side project management platform.

Fling is a tool for those of us who cannot help but create new side projects - flings. Some flings are started late at night and forgotten about the next day, while others we may continue working on over many weekends. Some may generate income, while others drain our savings. With so many projects in some state of development, keeping track of your flings, your fling's social media accounts, user activity or even where they're hosted can be nothing short of a nightmare. This tool is meant to help with that.

Fling allows you to collect and store "business state" separate
from both the source code (which lives in a git repo), and app
state (which usually lives in a production database somewhere).

Business state is:

 - Hosting details (where is it running)
 - Socials (blog, insta, mastodon)
 - Monthly costs
 - Income (revenue or donations)
 - Basic user stats (views, signups, sessions)
 - Partnership details (who built it with you)
 - History / Timeline (when was it started, deployed etc)

It consists of a CLI tool, a web service, and a cookiecutter template.

The CLI, along with a growing set of plugins, can be used to gather
"business state" about your project, and store that in the Fling service.

The cookiecutter template is language agnostic, and can be used for any 
new side project. It will add a *company-private* web interface that
can be used to browse and visualize your side project state.

<INSERT single side project company view here>

The Fling web service can be authenticated with GitHub, and used to aggregate
the Fling business state from *all* of your side projects.

<INSERT aggregated view screenshot here>

## Fling CLI plugins

### Namer

The namer plugin can be used through the ```search``` command. It uses ChatGPT to 
come up with great domain name ideas, and then the Name.com API to find some that
are available.

### Init

The init plugin is integrated with cookiecutter, and can be used to set up a new
side project with Fling support. Existing projects can be configured by manually 
creating a ```fling.yaml``` file and then running ```fling pull```.
red-postgres-Vertyco 0.0.1
Piccolo Postgres integration for Red
Requires Python: >=3.11

# red-postgres

Piccolo Postgres integration for Red-DiscordBot

# File structure for using with cogs
```
cog-folder/
    ├── db/
    │   ├── migrations/
    │   ├── piccolo_conf.py
    │   ├── piccolo_app.py
    ├── __init__.py
    ├── cog.py
```

# piccolo_conf.py
```python
import os

from piccolo.conf.apps import AppRegistry
from piccolo.engine.postgres import PostgresEngine

DB = PostgresEngine(
    config={
        "database": os.environ.get("POSTGRES_DATABASE"),
        "user": os.environ.get("POSTGRES_USER"),
        "password": os.environ.get("POSTGRES_PASSWORD"),
        "host": os.environ.get("POSTGRES_HOST"),
        "port": os.environ.get("POSTGRES_PORT"),
    }
)


APP_REGISTRY = AppRegistry(apps=["db.piccolo_app"])
```

# piccolo_app.py
```python
import os

from piccolo.conf.apps import AppConfig, table_finder

CURRENT_DIRECTORY = os.path.dirname(os.path.abspath(__file__))

APP_CONFIG = AppConfig(
    app_name="cog_name",
    table_classes=table_finder(["db.tables"]),
    migrations_folder_path=os.path.join(CURRENT_DIRECTORY, "migrations"),
)
```
for `table_classes` add in the list of tables you're using