semvec/pypi-packages huggingface dataset:
vectrix 0.0.75
An assistant helping you to index webpages into structured datasets.
License: MIT
Requires Python: <3.13,>=3.11

# PAGINX

![GitHub License](https://img.shields.io/github/license/vectrix-ai/paginx) ![PyPI - Version](https://img.shields.io/pypi/v/paginx) ![GitHub Tag](https://img.shields.io/github/v/tag/vectrix-ai/paginx)

 Paginx is an innovative Python-based project that leverages the power of Large Language Models (LLMs) and Retrieval-Augmented Generation (RAG) to provide intelligent question-answering capabilities for any given website. By simply entering a website URL, users can interact with an AI assistant that can answer questions and provide insights based on the content of the website.

## Setting Up a PostgreSQL instance with the pgvector Extension
To store the uploaded data for later retrieval (for example during RAG), you need to set up a PostgreSQL database with the pgvector extension enabled. This chapter guides you through the steps to install PostgreSQL, enable the pgvector extension, create a new database, and store the connection string as a URL. Alternatively, you can use hosted PostgreSQL instances provided by many cloud providers.

### 1. Install PostgreSQL and pgvector Extension
**Using Docker**
1.	Pull the PostgreSQL image with pgvector:
```sh
docker pull ankane/pgvector
```

2.	Run the PostgreSQL container with the pgvector extension enabled:
```sh
docker run -d --name paginx -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -e PG_EXTENSIONS="pgvector" ankane/pgvector
```

**Manual Installation**

If you prefer to install PostgreSQL and pgvector manually, please follow the instructions provided in the official documentation:

- [PostgreSQL Installation](https://www.postgresql.org/download/)
- [pgvector Installation](https://github.com/ankane/pgvector)

### 2. Create a New Database
Once you have PostgreSQL running with pgvector enabled, you need to create a new database for our application. You can do this by connecting to your PostgreSQL instance and executing the following SQL commands


Create a new database named `paginx` (you can choose a different name if you prefer):
```sql
CREATE DATABASE paginx;
```

Connect to the `paginx` database:
```sql
\c paginx;
```

Enable the pgvector extension for the `paginx` database:
```sql
CREATE EXTENSION IF NOT EXISTS vector;
```

### 3. Store the Connection String
After creating the database, you need to store the connection string as an enviroment variable named ```database_url```. This connection string will be used by paginx to connect to the database.


The envrioment variable can be set using the following command:
```sh
export database_url="postgresql://postgres:mysecretpassword@localhost/paginx"
```

### 4. Using a Hosted PostgreSQL Instance
If you prefer to use a hosted PostgreSQL instance, you can create a new database and store the connection string as a URL. Make sure to enable the pgvector extension for the hosted database.
multiversion-backup 1.0.2
A 'BackUp' class which copies a target file or folder to set output folders. Detects and keeps a set amount of backup versions and deletes old backups outside that range.
License: MIT
Requires Python: <4.0,>=3.12

# multiversion-backup

## Summary
An easily configurable `BackUp` class which copies a target file or folder to set output folders. Detects and keeps a set amount of backup versions and deletes old backups outside that range. 

## Breakdown

- You initialise a `BackUp` object and use `.copy()`
- A version of the backup target is saved to the output folder or folders
- A log file is generated, with logs detailing the backup activity (see example directory)
- Older backups outside of the specified limit are deleted
- Backups won't occur if the target hasn't changed (coming soon for folders)

## Quick Install

```
pip install multiversion-backup
```

## Usage

### Import the BackUp class
```python
from multiversion_backup import BackUp
```
### Create the BackUp object

#### Per File backup

```python
backup_object = BackUp(r"F:\image.jpg",  # Source file as a string
                     r"F:\File Backup",  # String or list of output folders
                     "important_file",  # Prefix for the output file name and log messages
                     3)  # Maximum amount of backups to keep
```

#### Per Folder backup

```python
backup_object = BackUp(r"F:\Folder",  # Source folder as a string
                       [r"F:\Folder Backup 1", r"F:\Folder Backup 2"],  # String or list of output folders
                       "important_folder",  # Prefix for the output folder name and log messages
                       5)  # Maximum amount of backups to keep
```

### Call the `.copy()` method

```python
backup_object.copy()
```

## Troubleshooting

- File or folder names in the output folders will be ignored if they do not start with the defined prefix
- Changes to the datetime string formatting of the output file's names will raise exceptions

## Why?

I made this since I was frustrated with syncing behaviours of services like OneDrive, which when used to sync files that were actively in use, would cause lag and other issues.

This method side steps the issue by letting you schedule when you copy to OneDrive, providing incremental multi-version backup and synchronisation without OneDrive disruptively trying to synchronise files that are always being actively used and changed like game saves and settings.