Skip to main content

nubra_workshop

Drop-in workshop adapter for the official Nubra Python SDK.

This package allows workshop participants and students to run unmodified, official Nubra Python SDK tutorials and examples without needing individual account signups, phone numbers, SMS OTPs, or MPINs.


🚀 Quick Start for Students

1. Install

pip install nubra_workshop

2. Patch explicitly, then run unmodified Nubra code

Write native Nubra SDK code exactly as shown in official Nubra documentation. Call apply_patch() once at startup — this is required (a bare import is not enough: the .pth auto-loader runs before the SDK is importable and cannot patch on its own; an import hook retries automatically, but explicit is reliable):

import nubra_workshop
nubra_workshop.apply_patch()
assert nubra_workshop.is_active(), nubra_workshop.status()

from nubra_python_sdk.start_sdk import InitNubraSdk, NubraEnv
from nubra_python_sdk.refdata.instruments import InstrumentData
from nubra_python_sdk.marketdata.market_data import MarketData

# Initializes via the workshop relay gateway automatically:
nubra = InitNubraSdk(NubraEnv.UAT)

# Fetch instruments:
instruments = InstrumentData(nubra)
inst = instruments.get_instrument_by_symbol("RELIANCE26OCT700CE", exchange="NSE")
print("Found instrument:", inst.stock_name if inst else "None")

# Live market data:
market = MarketData(nubra)
price_info = market.current_price("NIFTY")
print("Live NIFTY Price:", price_info.price if price_info else "N/A")

No OTP prompts, no MPIN prompts, and no custom code required!


⚙️ How It Works

  1. Explicit activation: call nubra_workshop.apply_patch() (idempotent) after importing. The site-packages auto-loader (.pth) attempts this for you, but Python runs it before the SDK is importable, so an import hook retries the patch when nubra_python_sdk is first imported. Verify with nubra_workshop.status().
  2. Explicit Import: include import nubra_workshop at the top of your script.
  3. Custom Gateway URL: If your instructor hosts a custom gateway, point to it using an environment variable:
    export NUBRA_GATEWAY_URL="https://your-custom-gateway.example.com"
    

📦 Compatibility

  • Official nubra-sdk >= 0.5.4
  • Python >= 3.9

Metadata

Release files for nubra-workshop 1.0.1

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

Source distribution (sdist)

Source distribution for nubra-workshop 1.0.1
File Size Uploaded
nubra_workshop-1.0.1.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nubra-workshop 1.0.1
File Interpreter ABI Platform
nubra_workshop-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.1 kB

Release files / nubra_workshop-1.0.1.tar.gz

Download URL nubra_workshop-1.0.1.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5765b0315bfbd574ad715a21911685e72fc691de8962193c9a003bf4b0281db6
BLAKE2b-256 checksum
How to use checksums
e11f38f6cddc816a8be19bdac584632fd89510446f1a9414e19d21560840b568
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.9

Release files / nubra_workshop-1.0.1-py3-none-any.whl

Download URL nubra_workshop-1.0.1-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c3d44085a55f52ee18395c316fdf53c01df8de81b837b6426c6de49f537f9074
BLAKE2b-256 checksum
How to use checksums
63062b72f3596ff405971e24c125e6bdc53f5b5f9da1c88f17076c37a8bdde61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.9

Release history Release notifications | RSS feed

1.0.2

2 release files

This release

1.0.1 This release

2 release files

1.0.0

2 release files

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