Skip to main content

General purpose Python wrapper utilities

Project description

grass‑wrapper

PyPI License: MIT CI

grass-wrapperPython 3.10+ で動作する汎用ユーティリティ集です。
時系列 API からのデータ取得/加工と、Google BigQuery への高速ロードをシンプルな API で提供します。


Features

Module What you get
grass_wrapper.CoinGlass REST クライアント生成とエンドポイントラッパー
例: get_fr_ohlc_history() で funding‑rate OHLC をリスト取得
grass_wrapper.BigQuery 軽量ラッパークラス BigQuery
upload_rows() — list[dict] をロード
upload_rows_if_absent() — 一意キー重複チェック付きロード
Type Hints & Pydantic‑like すべての関数が Python typing に対応し、IDE 補完が快適
パーティション / クラスタ自動生成 初回ロード時に PARTITION BYCLUSTER BY を自動設定

Installation

pip install grass-wrapper

開発者向け:

git clone https://github.com/grass-labs/grass-wrapper.git
cd grass-wrapper
pip install -e .[dev]   # includes pytest, ruff, black

Quick Start

from grass_wrapper.CoinGlass.client import CoinGlass
from grass_wrapper.BigQuery.client import BigQuery

cg = CoinGlass()                           # CG_API_KEY は環境変数から読む
bq = BigQuery(project_id="my-gcp-project") # 認証は ADC 前提

Requirements

  • Python ≥ 3.10
  • google-cloud-bigquery ≥ 3.35
  • requests ≥ 2.32
  • CoinGlass API key (CG_API_KEY)
    BigQuery は ADC もしくは Service Account JSON に対応

Contributing

  1. Fork & clone this repo
  2. pip install -e .[dev]
  3. ruff check . && pytest -q
  4. Make a PR against main

We ♥ contributions — issues, docs, tests, new features!


License

This project is licensed under the MIT License – see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

grass_wrapper-0.3.0.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

grass_wrapper-0.3.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file grass_wrapper-0.3.0.tar.gz.

File metadata

  • Download URL: grass_wrapper-0.3.0.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for grass_wrapper-0.3.0.tar.gz
Algorithm Hash digest
SHA256 66fcf28124cbdee1953f7ea9cfbc92d3eef62328d9d2cc6fb8d58e6efd34cbc1
MD5 2397c3788169fd6c670c6866abc69eb5
BLAKE2b-256 1f795c5479c5d91a6a8a95068f4e838c3bb6ca50431e505542082dd52a2f4b67

See more details on using hashes here.

File details

Details for the file grass_wrapper-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: grass_wrapper-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for grass_wrapper-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c80504fca5ebba26ca54df971e255ad448502109bb8db8614ed15878e7708143
MD5 83a0fab0c135d9989f03fcd3e0b28c0f
BLAKE2b-256 fb352b15027cf7cf8e42b14c2459a085e4a9db44154763274455dc3076005c1c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page