Skip to main content

description

A wrapper to access nocodb restful api using httpx

functions

test with nocodb v0.255.0

API endpoint
sub module
list read update create delete links
Auth ✅ ✅ ✅ ✅ ❌︎ -
Users for base ✅ ✅ ✅ ✅ ✅ -
Bases ✅ ✅ ✅ ✅ ✅ -
Record ✅ ✅ ✅ ✅ ✅ ✅
Table ✅ ✅ ✅ ✅ ✅ -
Column ✅ ✅ ❌︎ ❌︎ ❌︎ -
View ❌︎ ❌︎ ❌︎ ❌︎ ❌︎ -

example

sync mode

from pynocodb import Client
from rich import print


def run_sync():
    # here we use an api token.
    # you can do client.auth.signin to use auth token instead
    client = Client(token="YzDNLisEZQ4AuId1i9sodHbDC2eEJxadiAlRUHXu")

    bases = client.base.get_base_ids()
    print(bases)
    base_id = list(bases.values())[0]
    tables = client.table.get_table_ids(base_id)
    print(tables)
    table_id = list(tables.values())[0]
    print(client.record.list_records(table_id)["list"])


if __name__ == "__main__":
    run_sync()

async mode

import asyncio

from pynocodb import AsyncClient
from rich import print


async def run_async():
    client = AsyncClient()
    await client.auth.signin("liunux@qq.com", "r_PypPUajC6y!2B")

    bases = await client.base.get_base_ids()
    print(bases)
    base_id = list(bases.values())[0]
    tables = await client.table.get_table_ids(base_id)
    print(tables)
    table_id = list(tables.values())[0]
    print((await client.record.list_records(table_id))["list"])


if __name__ == "__main__":
    asyncio.run(run_async())

TODOs:

  • use pydantic to define schemas for table, column, source, base, etc.
  • support column creation & update
  • support view creation & update

Metadata

Release files for pynocodb 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for pynocodb 0.1.0
File Interpreter ABI Platform
pynocodb-0.1.0-py3-none-any.whl Python 3 none any Details

Release files / pynocodb-0.1.0-py3-none-any.whl

Download URL pynocodb-0.1.0-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b5056ee6480d77a26242c2eaeb220663fc49c5c0e0b5c5479a156e802da07cc3
BLAKE2b-256 checksum
How to use checksums
87b0895f84e317fa17dc8b14857f41b7a65f0108616c6c2b6540759fba6c87ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.14

Security for pynocodb 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page