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
- Explicit activation: call
nubra_workshop.apply_patch()(idempotent) after importing. Thesite-packagesauto-loader (.pth) attempts this for you, but Python runs it before the SDK is importable, so an import hook retries the patch whennubra_python_sdkis first imported. Verify withnubra_workshop.status(). - Explicit Import: include
import nubra_workshopat the top of your script. - 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)
| File | Size | Uploaded | |
|---|---|---|---|
| nubra_workshop-1.0.1.tar.gz | 4.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|