semvec/pypi-packages huggingface dataset:
vnet-kernel 0.6.0
virtual network project
Requires Python: >=3.11

[vnet-kernel · PyPI](https://pypi.org/project/vnet-kernel/)


## 使用

```shell
$ sudo docker login --username=GnixAij crpi-fh5v47zqih6dmh6j.cn-hangzhou.personal.cr.aliyuncs.com
[OUTPUT]
Password: qwe123``
$ sudo docker pull crpi-fh5v47zqih6dmh6j.cn-hangzhou.personal.cr.aliyuncs.com/vnet/vnet-kernel:0.4.5
[OUTPUT]
0.4.5: Pulling from vnet/vnet-kernel
fd0410a2d1ae: Pull complete 
4f4fb700ef54: Pull complete 
2e828bf4b3ea: Pull complete 
0d57067b0070: Pull complete 
eebea7d23b79: Pull complete 
Digest: sha256:8e24d5a39d79b11d87bf5871d3b407d73ce8c38e9503b5cf2d29b103a3c080c6
Status: Downloaded newer image for crpi-fh5v47zqih6dmh6j.cn-hangzhou.personal.cr.aliyuncs.com/vnet/vnet-kernel:0.4.5
crpi-fh5v47zqih6dmh6j.cn-hangzhou.personal.cr.aliyuncs.com/vnet/vnet-kernel:0.4.5
```

## python

doc

```shell
$ uv pip install -r pyproject.toml --extra doc
$ mkdocs serve
```

dev

```shell
$ uv pip install -r pyproject.toml --extra dev
# test
$ make test
```

## IPC

1. 目前实现方案为使用 `json` 文件作为中间数据格式，Python 运行 HTTP 服务，C 通过 `curl.h` 构造 HTTP 请求
默认占用端口为 8000，执行时间在 1-3s； 2024.11.28
2. 使用 POSIX Message Queue 进行 VNet 与 C 的通信; 2024.11.30 

![alt text](assets/README.png)

## Ref

[VNet Labs](https://github.com/Efterklang/vnet-lab/blob/main/README.md)
pydataimport 0.1.2
To fetch data from API and import to SQL Server in Python
Requires Python: >=3.8

# PyDataImport

A Python package for importing data from various sources to SQL Server databases.

## Installation

You can install the package using pip:

```bash
pip install pydataimport
```

## Usage

```python
import pydataimport as pdi

# Import data from JSON
pdi.import_data(
    "json",
    data_source,
    "table_name",
    operation_mode=pdi.OPERATION_MODE['SINGLE_INSERT']
)

# Fetch data from database
data = pdi.fetch_data("SELECT * FROM your_table")

# Get current date in string format
current_date = pdi.date_str_now()

# Track script runtime
with pdi.track_script_runtime() as timer:
    # Your code here
    pass
```

## Features

- Data import from various sources (JSON, CSV, etc.)
- Database operations (fetch, execute stored procedures)
- Utility functions for date handling
- Script runtime tracking
- Environment configuration management

## Configuration

The package uses environment variables for configuration. Create a `.env` file with the following variables:

```env
# API Configuration
DATA_SRC_API_ENDPOINT=your_api_endpoint
DATA_SRC_TOKEN=your_api_token

# Database Configuration
DATA_DES_CONNECTION_TYPE=window  # or 'remote' for SQL authentication
DATA_DES_SERVER=your_server
DATA_DES_DB_NAME=your_database
DATA_DES_PORT=1433
DATA_DES_USERNAME=your_username
DATA_DES_PASSWORD=your_password
DATA_DES_DRIVER=SQL Server Native Client 11.0  # or your preferred SQL Server driver
DATA_DES_TABLE=your_table
DATA_DES_STORED_PROCEDURE=your_stored_procedure

# Operation Mode
OPERATION_MODE=DROP_OLD_CREATE_NEW
```

### SQL Server Driver Configuration

The package uses pyodbc to connect to SQL Server. You need to specify the correct driver name in the `DATA_DES_DRIVER` environment variable. Common driver names include:

- `SQL Server Native Client 11.0`
- `ODBC Driver 17 for SQL Server`
- `ODBC Driver 18 for SQL Server`

To find available drivers on your system, you can run:
```python
import pyodbc
print(pyodbc.drivers())
```

## Requirements

- Python 3.8 or higher
- SQL Server database
- Required Python packages (automatically installed with pip):
  - pandas
  - pyodbc
  - requests
  - python-dateutil
  - numpy

## License

This project is licensed under the MIT License - see the LICENSE file for details.