semvec/pypi-packages huggingface dataset:
resman-client 1.10
Python client of Resman
Requires Python: >=3.7

# ResMan Client

## Introduction

This is the client of [Resman Server](https://github.com/TsingJyujing/resman).

Use `pip install resman-client` to install it.

## Initialize

```python
from resman_client import ResmanClient

client = ResmanClient(
    "https://resman.xxx.com/",
    "user-name",
    "password"
)
```

## Image List

```python
from resman_client import ImageList, DefaultS3Image, ImageListClient

image_list: ImageListClient = client.create_image_list(
    ImageList(
        title="title",
        description="content",
        data={
            # jsonable object
        }
    )
)

image_list.append_s3_images([
    # DefaultS3Image objects
    # Can be different bucket, but must be same server as Resman Server
])

image_list.upload_images([
    # filenames, binary data or binary IOs
])
```

## Video List

```python
from resman_client import VideoListClient, VideoList

video_list: VideoListClient = client.create_video_list(
    VideoList(
        title="title",
        description="whatever",
        data={
            # jsonable object 
        }
    )
)

# Upload video
video_list.upload_mp4_video(
    "mp4 file path"
)
```

## Novel

```python
from resman_client import NovelClient, Novel

novel: NovelClient = client.create_novel(
    Novel(
        title="title",
        data={
            # jsonable object 
        }
    ),
    text="Content of the novel"
)
```


## Some Notice

- Support mp4 (h264/h265) video only
- data is a JSON body to store some metadata like original URL, won't be displayed in website
- Video and Image list have an attribute order to control the order, auto increasing (+1) will be applied while uploading multi objects, the order of objects with same `order` field can't be predicted.
wikibase-reconcile 0.2.0
A concurrent client to reconcile entities against wikidata.
Requires Python: >=3.7

# Wikibase Reconcile

An multi-threaded client to reconcile against wikidata.

This project is inspired by [reconciler](https://pypi.org/project/reconciler/). If you look for stable and mature software, I recommend using the excellent package `reconciler`.


## Features

- Concurrent requests to wikidata reconiliation API
- Makes atomic requests and is more robust when the API returns errors
- Takes a pandas dataframe as input and also as output
- User has rather high degree of control (but also needs more code)

## Installation

```
pip install wikibase-reconcile
```

## Usage

```python
from wikibase_reconcile import Client

client = Client()

# Initialize some simple test data
characters = [
    {"type": "Q15632617", "query": "Marge Simpson"},
    {"type": "Q15632617", "query": "Homer Simpson"},
    {"type": "Q15632617", "query": "Bart Simpson"},
    {"type": "Q15632617", "query": "Lisa Simpson"},
    {"type": "Q15632617", "query": "Maggie Simpson"},
    {"type": "Q15632617", "query": "Abraham Simpson"},
    {"type": "Q15632617", "query": "Apu Nahasapeemapetilon"},
    {"type": "Q15632617", "query": "Barney Gumble"}
]

df = pd.DataFrame(characters)

# reconcile each search query against the type "Fictional Human"
results = client.reconcile(df)

# Turn results into a dataframe, keep only the top result
df_reconciled = client.results_to_pandas(results)
```

### Fallback Logic

You can specify an additional fallback search string in case the first attempt did not yield any result:


```python
query = {"type": "Q15632617", "query": "Marge Simpson", "fallback_query": "Marjorie Bouvier"}
```

One use case for fallback queries are lemmatized versions of the original query.

If this still yields no results, then the reconciler will attempt to match the first part of the query, by splitting the query at every hyphen character (`-`) and taking the first part. **This logic is likely to change in future versions.**

The final fallback is to ignore the type and try to reconcile against any type. The default API server (`https://wikidata.reconci.link/`) will then match against the generic entity type (Q35120).