semvec/pypi-packages huggingface dataset:
django-model-curation 0.0.0
A Django app that adds admin curations for custom models.
License: MIT
Requires Python: >=3.8

# Django Model Curation

Adds a simple but flexible curation environment to admin panel for django models.  


### Install:

``pip install django-model-curation``


### Example Use:

models.py:
```python
from django.db import models
from django_model_curation.models import AbstractCuration


class Book(models.Model):
    pass
  

class BookCuration(AbstractCuration, models.Model):
    book = models.OneToOneField(
        to=Book,
        on_delete=models.CASCADE,
        related_name="curation",
        blank=True,
        null=True,
    )

    # This property is required by AbstractCuration
    @property
    def curation_object(self):
        return self.book

```

admin.py
```python
from django.contrib import admin
from models import BookCuration

from django_model_curation.admin import GenericCurationModelAdmin

@admin.register(BookCuration)
class BookCurationModelAdmin(GenericCurationModelAdmin):
    pass

```

complement your own business logic by accessing the field ``status``,   
for example show only curated objects on your website.

```python
from django_model_curation.models import (
    CURATION_PENDING,
    CURATION_ACCEPTED, 
    CURATION_RECALLED_BY_USER,
    CURATION_UPDATE_BY_USER,
    CURATION_REJECTED_PERMANENTLY,
    CURATION_REJECTED_TEMPORARILY
    )

def get_curated_books():
  return Books.objects.filter(curation__status=CURATION_ACCEPTED)

```

### Admin Permissions
  actions:  
  {{model}}_can_revert_curation  
  {{model}}_can_accept_curation  
  {{model}}_can_reject_curation_permanently  
  {{model}}_can_reject_curation_temporarily  

  meta:  
  {{model}}_allow_actions_on_accepted  
  {{model}}_allow_actions_on_rejected
pushx 0.4.0
One-Stop Python Push Solution
License: MIT
Requires Python: <4.0,>=3.9
Keywords: push, python, allinone, AIO

# PushX  
One-Stop Python Push Solution.
## Introduction
Python-based Aggregate Push Module

## Supported Push Providers
- [x] Ntfy
- [x] ServerChan3
- [x] ServerChanTurbo 
- [ ] And more...

## Install

```bash
pip install pushx
```

## Usage
The docs is [here](https://illustar0.github.io/PushX), you can also refer to the Examples below.  

## Examples
### Example 1
```python
from pushx import Notifier, providers

n = Notifier(providers.ServerChan3, sendkey="666",uid=2233)
n.notify(title="test title",desp="test content")
# content/message=("content") is also fine
```
### Example 2
```python
from pushx import Notifier, providers

n = Notifier(providers.Ntfy, topic="233233233")
p = providers.Ntfy.NotifyParams(
    title="test title",
    message=("test message"), # content=("test message") is also fine
    tags=["tag1", "tag2"],
    priority=5,
    markdown=True,
    actions=[
        {
            "action": "view",
            "label": "Open portal",
            "url": "https://home.nest.com/",
            "clear": True,
        },
        {
            "action": "http",
            "label": "Turn down",
            "url": "https://api.nest.com/",
            "body": '{"temperature": 65}',
        },
    ],
    click="https://illustar0.com",
)
n.notify(p)
```
treee 1.0.2
Visualizes directory tree from the current command line folder.
License: MIT
Requires Python: >=3.8

# Treee

This package was created to help me visualize directory structures in my coding tutorials. There are many ASCII tree visualizers available but this one adds two features I needed:

- Sort alphabetically but first by directories, then by files
- Exclude specific directories and files from the output

Example:

```
treee/
├── dist/
│   ├── treee-1.0.0-py3-none-any.whl
│   └── treee-1.0.0.tar.gz
├── src/
│   └── treee/
│       └── tree.py
├── .gitignore
├── LICENSE.txt
├── README.md
└── pyproject.toml
```

## Install

```
pip install treee
```

Visit project on [PyPI](https://pypi.org/project/treee)

## Features

- Shows ASCII tree of current folder and beyond
- Sorts by type (folders on top), then by name
- Supports excluding of directories
- Can be run from terminal or imported in Python code

## Import in exising code

```
from treee import tree

tree.print_tree()
```

## Run from command line

```
treee
```

## Exclude files

Create file `.treee-ignore` in the directory where treee is executed.

Example of ignored directories:

```
env
__pycache__
*egg*
.git
```
FloraServer 0.1.0
A modified websocket-server that supports communication on the same port as flask
License: MIT
Requires Python: >=3.8

## Language
* **[`简体中文`](./README.md)**
* **`English`**
# FloraServer
**By inheriting a large number of modified `websocket-server` library classes to customize a network router, splitting regular `HTTP` connections from `WebSocket` connections, and constructing a `WSGI` environment and `HTTP` request headers to call `flask`, `websocket-server` and `flask` can communicate on the same port**
# How to use it?
1. **~~You can choose to directly 'clone' this repository into your project~~**
2. **Use the following command to install**
```Shell
pip install FloraServer
```
3. **Import `FloraServer` into your project `From FloraServer import [class]`**
**There are two `WebSocketServer classes` in this project, one is `FloraFlaskWSServer`, the protagonist of this repository, and the other is `FloraWebsocket Server`, which is not much different from `Websocket Server`, only with relatively loose connections**  
4. **To start using, follow the development documentation for `flask` and `websocket-server`**
## Code Demonstration
```Python
from FloraServer import FloraFlaskWSServer
from flask import Flask

app = Flask(__name__)

@app.route("/")
def index():
    return "Hello world!"


def on_message(client, server, message):
    print(message)


if __name__ == "__main__":
    server = FloraFlaskWSServer(flask_app=app, host="0.0.0.0", port=5000)
    server.set_fn_message_received(on_message)
    server.run_forever()
```