Skip to main content

Python Ragic API client for data loading and manipulation.

Project description

Python Ragic

A Python client for interacting with the Ragic API. This library simplifies making requests to Ragic databases, handling authentication, and working with records.


Table of Contents


Features

  • Easy authentication and connection setup
  • Read data from Ragic databases

Getting Started

  1. Get your API key from Ragic. link

    1.1. Add environment variables to .env file:

    • RAGIC_URL
    • RAGIC_NAMESPACE
    • RAGIC_API_KEY
  2. Setup structure.yaml.

    2.1. Follow the structure file to define the structure of your database.

    2.2. Retrieve the field id from Ragic. link

  3. Install the package using pip:

    pip install python-ragic
    
  4. Code snippet to get started:

    from ragic import RagicAPIClient
    
    client = RagicAPIClient(
        base_url=None,
        namespace=None,
        api_key=None,
        version=3,
        structure_path="structure.yaml",
    )
    
    TAB_NAME = "Sales Management System"
    TABLE_NAME = "customer"
    
    data_dict = client.load(
        TAB_NAME,
        TABLE_NAME,
        conditions=[("gender", OperandType.EQUALS, "Male")],
        offset=0,
        size=10,
        other_get_params=OtherGETParameters(subtables=False, listing=False),
        ordering=Ordering(order_by="customer_id", order=OrderingType.ASC),
    )
    
    if data_dict:
        with open("data.json", "w", encoding="utf-8") as f:
            f.write(json.dump(data_dict, f, indent=4))
    else:
        print("No data found.")
    

Future Improvements

  • Update and delete records

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

python_ragic-0.1.1.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

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

python_ragic-0.1.1-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file python_ragic-0.1.1.tar.gz.

File metadata

  • Download URL: python_ragic-0.1.1.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.11

File hashes

Hashes for python_ragic-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1c1d5ca00536f2885c4eff96a20b575d01f9323046bf14e313b5930903cf9065
MD5 9c8e39e98441b3e6ab1e09a0634cee38
BLAKE2b-256 61bee5a366ddbe31c82b3f7c7b8ca8132752864a8658c2a40429e3c7ffb70f08

See more details on using hashes here.

File details

Details for the file python_ragic-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: python_ragic-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.11

File hashes

Hashes for python_ragic-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 17be2952d2f452824e5a9216cbfd87ac22286e4659d94887a9862934fb6ebe4d
MD5 ac39f8ac852dc865f974008ba02be5b4
BLAKE2b-256 93851be1fb3c789f83d12337ff1127db443b6ae829b074517d0cae578fc85b6a

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