semvec/pypi-packages huggingface dataset:
kanji-to-time 0.0.4
Convert Japanese time expressions to datetime objects
License: MIT
Keywords: kanji, timedelta, datetime, japanese

# Kanji to time

日本語の漢字などで書かれた年月日をPythonのdatetime型やtimedelta型に変換するライブラリ。<br>
漢数字、旧字漢数字、全角などに対応しています。

内部では正規表現ではなくパーサージェネレータを使用しているので複雑なルールに対応しやすいようになっています。

## 使い方

```bash
pip install kanji_to_time
```

```python
import kanji_to_time as ktt

text = "2024年4月5日22時30分4秒"
dt = ktt.to_datetime(text)
print(dt)

text = "二時間三十秒"
td = ktt.to_timedelta(text)
print(td)
```

## 対応パターン例

### datetimeの変換

```python
dt = ktt.to_datetime("2024年4月5日22時30分4秒")
self.assertEqual(
    dt, datetime(year=2024, month=4, day=5, hour=22, minute=30, second=4)
)

dt = ktt.to_datetime("２０２０年５月７日")
self.assertEqual(dt, datetime(year=2020, month=5, day=7))

dt = ktt.to_datetime("二〇二五年十二月七日")
self.assertEqual(dt, datetime(year=2025, month=12, day=7))

dt = ktt.to_datetime("二千年八月三日")
self.assertEqual(dt, datetime(year=2000, month=8, day=3))

dt = ktt.to_datetime("弐零弐参年伍月肆日")
self.assertEqual(dt, datetime(year=2023, month=5, day=4))
```

### timedeltaの変換

```python
td = ktt.to_timedelta("二時間三十秒")
self.assertEqual(td, timedelta(hours=2, seconds=30))

td = ktt.to_timedelta("六日間二時間五分間三秒間")
self.assertEqual(td, timedelta(days=6, hours=2, minutes=5, seconds=3))

td = ktt.to_timedelta("六日二時五分三秒")
self.assertEqual(td, timedelta(days=6, hours=2, minutes=5, seconds=3))

td = ktt.to_timedelta("90秒")
self.assertEqual(td, timedelta(seconds=90))

td = ktt.to_timedelta("マイナス七億分")
self.assertEqual(td, timedelta(minutes=-700_000_000))

td = ktt.to_timedelta("45秒前")
self.assertEqual(td, timedelta(seconds=-45))

td = ktt.to_timedelta("45秒後")
self.assertEqual(td, timedelta(seconds=45))
```

その他詳細なパターンはこちらのファイルを参照
* [tests/test_to_datetime.py](tests/test_to_datetime.py)
* [tests/test_to_timedelta.py](tests/test_to_timedelta.py)
* [tests/test_to_number.py](tests/test_to_number.py)

対応している文法の構造自体を確認したい場合はLark定義ファイルを参照
* [kanji_to_time/grammer/kanji_to_time.lark](kanji_to_time/grammer/kanji_to_time.lark)

## ユニットテスト

```bash
pip install -r requirements.txt
python -m unittest discover -s tests
```

## リンター

チェック

```bash
ruff check
```

フォーマット修正

```bash
ruff format
```

## 問い合わせ

バグや機能要望についてはissueに報告をお願いします。<br/>
https://github.com/corkborg/kanji_to_time/issues

その他の問い合わせはメールまで<br/>
corkborg@outlook.jp

## リリースノート

### v0.0.4

* 萬阡拾のサポート
* 百の桁周りの対応

### v0.0.3

* to_timedeltaで接尾辞の「前」、「後」のサポート。 （ex: 20秒前は-20秒に、20秒後は20秒に）
* to_timedeltaで「プラス」、「+」などのサポート。（ex: +20分）
* カンマで区切られた数値をサポート（ex: 2,000）
Appium-Flutter-Finder 0.8.0
An extension of finder for Appium flutter
License: MIT
Keywords: appium, flutter, python client, mobile automation

# Getting the Appium Flutter Finder

There are three ways to install and use the Appium Flutter Finder.
Supported Python version follows appium python client.

1. Install from [PyPi](https://pypi.org), as ['Appium-Flutter-Finder'](https://pypi.org/project/Appium-Flutter-Finder/).

    ```shell
    pip install Appium-Flutter-Finder
    ```

2. Install from source, via [PyPi](https://pypi.org). From ['Appium-Flutter-Finder'](https://pypi.org/project/Appium-Flutter-Finder/),
download and unarchive the source tarball (Appium-Flutter-Finder-X.X.tar.gz).

    ```shell
    tar -xvf Appium-Flutter-Finder-X.X.tar.gz
    cd Appium-Flutter-Finder-X.X
    python setup.py install
    ```

3. Install from source via [GitHub](https://github.com/appium/python-client).

    ```shell
    git clone git@github.com:appium/python-client.git
    cd python-client
    python setup.py install
    ```

# How to use
Examples can be found out [here](../../example/python/example.py).

# Release

```
pip install twine
```

```
python setup.py sdist
twine upload dist/Appium-Flutter-Finder-X.X.tar.gz
```

# Changelog
- 0.8.0
    - Update the limit of python appium client version
- 0.7.0
    - Update the limit of python appium client version
- 0.6.1
    - Fix package
- 0.6.0
    - Fix type of `match_root` and `first_match_only` in `by_ancestor` and `by_descendant
- 0.5.0
    - Allow Appium-Python-Client to be v3
- 0.4.0
    - Bump base Appium-Python-Client to v2
- 0.3.1
    - Use Appium-Python-Client 1.x
- 0.3.0
    - Add `first_match_only` option in `by_ancestor` and `by_descendant`
- 0.2.0
    - Support over Python 3.6
- 0.1.5
    - Fix `by_ancestor` and `by_descendant`
        - https://github.com/truongsinh/appium-flutter-driver/pull/165#issuecomment-877928553
- 0.1.4
    - Remove whitespaces from the decoded JSON
    - Fix `by_ancestor` and `by_descendant`
- 0.1.3
    - Allow `from appium_flutter_finder import FlutterElement, FlutterFinder`
- 0.1.2
    - Fix b64encode error in Python 3
- 0.1.1
    - Initial release
sqlalchemy-altibase7 0.0.6
Altibase for SQLAlchemy
License: MIT
Keywords: SQLAlchemy Altibase

# sqlalchemy-altibase7
- Altibase support for SQLAlchemy implemented as an external dialect.
- It is tested on Altibase v7.
- This source code is maintained on https://github.com/hesslee/sqlalchemy-altibase7
- This source code is based on https://pypi.org/project/sqlalchemy-altibase
- This package is uploaded on https://pypi.org/project/sqlalchemy-altibase7

# Changes from sqlalchemy-altibase
- It is mainly supplemented for langchain connectivity.
- sqlalchemy version upper limit requirement is removed.

## Prereqisite
- Download and install Altibase server and client from http://support.altibase.com/en/product
- Unixodbc setting for Linux
- ODBC DSN setting for Windows

### Unixodbc setting example for Linux
- install : sudo apt-get install unixodbc-dev
- example configuration :
```
$ cat /etc/odbc.ini 
[PYODBC]
Driver          = /home/hess/work/altidev4/altibase_home/lib/libaltibase_odbc-64bit-ul64.so
Database        = mydb
ServerType      = Altibase
Server          = 127.0.0.1
Port            = 21121
UserName        = SYS
Password        = MANAGER
FetchBuffersize = 64
ReadOnly        = no

$ cat /etc/odbcinst.ini 
[ODBC]
Trace=Yes
TraceFile=/tmp/odbc_trace.log
```

### ODBC DSN setting example for Windows
- Altibase Windows ODBC driver is registered during Altibase Windows client installation procedure.
- Add a ODBC DSN for Altibase.
- example configuration :
```
[Altibase Connection Config]
Windows DSN Name: PYODBC
host(name or IP): 192.168.1.210
Port(default 20300): 21121
User: SYS
Password: MANAGER
Database: mydb
NLS_USE: UTF-8
```

# sqlalchemy-altibase7 using langchain
- install : pip install sqlalchemy-altibase7
- reference : https://python.langchain.com/v0.1/docs/use_cases/sql/
- test preparation : Populate sample data into Altibase database using "test/Chinook_Altibase.sql" file in this repository.
- test programs
  - langchain_chain.py : using chain
    - reference : https://python.langchain.com/v0.1/docs/use_cases/sql/quickstart/#chain
  - langchain_agent.py : using sql agent
    - reference : https://python.langchain.com/v0.1/docs/use_cases/sql/agents/#agent