Official Python SDK for the 0Gate ramp API. Stripe-style ergonomics — secret keys, sessions, signed webhooks.
Project description
@0bit/0gate
Unified official SDK for the 0Gate ramp API — Node server, browser embed, React components, and Python.
Install
| Surface | Command |
|---|---|
| Node (server) | npm install @0bit/0gate |
| Browser (bundler) | npm install @0bit/0gate → import { GateRamp } from '@0bit/0gate/browser' |
| React | npm install @0bit/0gate → import { RampCheckout } from '@0bit/0gate/react' |
| Python | pip install 0bit-0gate → from zerobit.gate import GateClient |
Python framework extras
pip install "0bit-0gate[django]"
pip install "0bit-0gate[fastapi]"
pip install "0bit-0gate[flask]"
Quick start — Node
import { GateClient } from '@0bit/0gate';
const client = new GateClient({ apiKey: process.env.GATE_KEY! });
const session = await client.sessions.create({
amount: '100.00',
currency: 'EUR',
return_url: 'https://myapp.example/done',
});
console.log(session.client_secret);
Quick start — Browser
import { GateRamp } from '@0bit/0gate/browser';
const ramp = new GateRamp({
publishableKey: 'pk_test_...',
clientSecret: session.client_secret,
});
await ramp.mount('#gate-container');
CDN (IIFE):
<script src="https://cdn.jsdelivr.net/npm/@0bit/0gate/dist/browser/0gate.iife.js"></script>
<script>
const ramp = new GateJS.GateRamp({ publishableKey: 'pk_test_...', clientSecret: 'gsec_...' });
ramp.mount('#container');
</script>
Quick start — React
import { RampCheckout } from '@0bit/0gate/react';
<RampCheckout
publishableKey={import.meta.env.VITE_GATE_KEY}
clientSecret={session.client_secret}
onSuccess={({ txId }) => router.push('/done')}
/>
Quick start — Python
from zerobit.gate import GateClient
client = GateClient(api_key="sk_test_...")
session = client.sessions.create({
"amount": "100.00",
"currency": "EUR",
"return_url": "https://myapp.example/done",
})
print(session["client_secret"])
SDK naming policy
| Surface | 0Gate | Future products |
|---|---|---|
| npm | @0bit/0gate |
@0bit/0pools, @0bit/0base |
| PyPI | 0bit-0gate |
0bit-0pools, 0bit-0base |
| Python import | zerobit.gate |
zerobit.pools, zerobit.base |
Development
cd 0Bit_apps/0Gate/0Gate_Sdk
npm ci && npm run build && npm test
pip install -e ".[dev,django,fastapi,flask]"
pytest
License
MIT. Part of the 0Bit / 0Gate ramp platform.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file 0bit_0gate-0.1.0.tar.gz.
File metadata
- Download URL: 0bit_0gate-0.1.0.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a024d9d6207c31ef32fc4e789acdbae879c121087738ac7a2a6bb5a543c703bd
|
|
| MD5 |
49f5ef3d20eb366bd7f8fa6c30d9e723
|
|
| BLAKE2b-256 |
8c072be296f712a23694c26c8db359016e9a04b5a12d8a22975863e1d0640980
|
Provenance
The following attestation bundles were made for 0bit_0gate-0.1.0.tar.gz:
Publisher:
publish-0bit-sdks.yml on 0Bit-org/0bit_core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
0bit_0gate-0.1.0.tar.gz -
Subject digest:
a024d9d6207c31ef32fc4e789acdbae879c121087738ac7a2a6bb5a543c703bd - Sigstore transparency entry: 1687097214
- Sigstore integration time:
-
Permalink:
0Bit-org/0bit_core@1bc12cc92aa3586236f171837b767b06d7ec78e1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/0Bit-org
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-0bit-sdks.yml@1bc12cc92aa3586236f171837b767b06d7ec78e1 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file 0bit_0gate-0.1.0-py3-none-any.whl.
File metadata
- Download URL: 0bit_0gate-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
063bddd8af4a61ae4696c6fb89c9f8c7576ef061d19ad04a6b1258e3926a922f
|
|
| MD5 |
c1b1b3a020cb387abe136fdbfc37f9cf
|
|
| BLAKE2b-256 |
b1ddb3fd1129afa97a883828c10ea8545f6bb9490622ef76e9ea38f9f4897c14
|
Provenance
The following attestation bundles were made for 0bit_0gate-0.1.0-py3-none-any.whl:
Publisher:
publish-0bit-sdks.yml on 0Bit-org/0bit_core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
0bit_0gate-0.1.0-py3-none-any.whl -
Subject digest:
063bddd8af4a61ae4696c6fb89c9f8c7576ef061d19ad04a6b1258e3926a922f - Sigstore transparency entry: 1687098550
- Sigstore integration time:
-
Permalink:
0Bit-org/0bit_core@1bc12cc92aa3586236f171837b767b06d7ec78e1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/0Bit-org
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-0bit-sdks.yml@1bc12cc92aa3586236f171837b767b06d7ec78e1 -
Trigger Event:
workflow_dispatch
-
Statement type: