semvec/pypi-packages huggingface dataset:
animwal 0.1.1
animated wallpapers
Requires Python: >=3.8,<4.0

# animwal

This project is a rip-off-_ish_ Python port of [paperview](https://github.com/glouw/paperview). It's description: A high performance animated desktop background setter for X11 and Windows (with animwal) that won't set your CPU on fire, drain your laptop battery, or lower ya vidya game FPS.

##### What is different from paperview?
Well, at the core there is nothing really different, just some SDL routines. But this project also supports Windows by utilizing WinAPI. And if you're lazy, built-in support for extracting frames from gif files.

#### Dependencies
You'll need `SDL2` and `SDL_Image` libraries. if you're on Windows, you can just install `pysdl2-dll` package from PyPI.  
For Python packages, you need `pysdl2` and `pillow`. Also, I'm using [poetry](https://python-poetry.org/) as package manager on this project.

#### Usage
```
usage: animwal [-h] [-a path time] [-g gif-file output]

animated wallpapers

optional arguments:
  -h, --help            show this help message and exit
  -a path time, --animate path time
                        animate image files placed in `path` every `time` ms.
  -g gif-file output, --generate gif-file output
                        extract frames from given `gif-file` to `output` folder.
```
datalite-eambertide 0.1
A small package that binds dataclasses to an sqlite database
Requires Python: >=3.6

# Datalite

Datalite is a simple Python
package that binds your dataclasses to a table in a sqlite3 database,
using it is extremely simple, say that you have a dataclass definition,
just add the decorator `@datalite(db_name="db.db")` to the top of the
definition, and the dataclass will now be bound to the file `db.db`

For example:

```python
from dataclasses import dataclass
from datalite import datalite


@datalite(db_path="db.db")
@dataclass
class Student:
    student_id: int
    student_name: str = "John Smith"
```

This snippet will generate a table in the sqlite3 database file `db.db` with
table name `student` and rows `student_id`, `student_name` with datatypes
integer and text, respectively. The default value for `student_name` is
`John Smith`.

## Entry manipulation

After creating an object traditionally, given that you used the `datalite` decorator,
the object has two new methods: `.create_entry()` and `.remove_entry()`, you
can add the object to its associated table using the former, and remove it
using the latter.

```python
student = Student(10, "Albert Einstein")
student.create_entry()  # Adds the entry to the table associated in db.db
student.remove_entry()  # Removes from the table.
```

But what if you have created your object in a previous session, or wish
to remove an object unreachable? ie: If the object is already garbage 
collected by the Python interpreter? `remove_from(class_, obj_id)` is
a function that can be used for this express purpose, for instance:

```python
remove_from(Student, 2)  # Removes the Student with obj_id 2.
```

Object IDs are auto-incremented, and correspond to the order the entry were
inserted onto the system.

## Fetching Records
> :warning: **Limitation! Fetch can only fetch limited classes correctly**: int, float and str!

Finally, you may wish to recreate objects from a table that already exist, for
this purpose we have the function `fetch_from(class_, object_id)` as well
as `is_fetchable(className, object_id)` former fetches a record from the
SQL database whereas the latter checks if it is fetchable (most likely
to check if it exists.)

```python
>>> fetch_from(Student, 2)
Student(student_id=10, student_name='Albert Einstein')
```

Finally, we have two helper methods, `fetch_range(class_, range_)` and
`fetch_all(class_)` the former fetches the records fetchable from the object
id range provided by the user, whereas the latter fetches all records. Both
return a tuple of `class_` objects.