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.2

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.2
File Size Uploaded
nubra_workshop-1.0.2.tar.gz 4.9 kB Details

Built distribution (wheel)

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

Total release size: 10.1 kB

Release files / nubra_workshop-1.0.2.tar.gz

Download URL nubra_workshop-1.0.2.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
012beb986d95a1e97b415f1e42350b5fe899b1a2f8a631bf209e577692163282
BLAKE2b-256 checksum
How to use checksums
ab04dbde534a203cd7e963a4f469a3b1a3d3c1751f6e65d53515a3c5d2a202c3
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.2-py3-none-any.whl

Download URL nubra_workshop-1.0.2-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ad194dba1af9a3fada9693120f576a14c4d751a11e2e4dc751c17fccdef79d78
BLAKE2b-256 checksum
How to use checksums
8bc17d0e41eca0d0d11913fd6160709a573090255159af80f1751d66802fda07
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

This release

1.0.2 This release

2 release files

1.0.1

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