Skip to main content

Official Python SDK for JStudio's API & WebSocket services - Fast, reliable API for real-time data from Various Games (Roblox)

Project description

JStudio Python SDK

Official Python SDK for JStudio's API & WebSocket services - Fast, reliable API for real-time data from Various Games (Roblox).

Installation

pip install jstudio

Quick Start

import jstudio

# Connect to JStudio API
client = jstudio.connect('js_your_api_key_here')

# Get all stock data
stocks = client.stocks.all()
print(f"Seed stock items: {len(stocks['seed_stock'])}")

# Get specific stock types
seed_items = client.stocks.seeds()
print(f"Found {len(seed_items)} seed items")

# Weather information
weather_data = client.weather.all()
active_weather = client.weather.active()
print(f"Active weather events: {len(active_weather)}")

# Get item information
all_seeds = client.items.seeds()
specific_item = client.items.get('apple')

# Calculator
result = client.calculator.calculate({
    'Name': 'Apple',
    'Weight': '5.2',
    'Variant': 'Golden'
})

# Get image URLs
image_url = client.images.get_url('apple')

API Reference

Client Initialization

import jstudio

client = jstudio.connect(
    api_key='js_your_key_here',    # Required: Your JStudio API key
    base_url='https://api.joshlei.com',  # Optional: Custom API base URL
    timeout=30,                     # Optional: Request timeout in seconds
    retries=3,                      # Optional: Number of retry attempts
    retry_delay=1.0                 # Optional: Delay between retries
)

Stocks API

# Get all stock data
all_stocks = client.stocks.all()

# Get specific stock types
seeds = client.stocks.seeds()
gear = client.stocks.gear()
eggs = client.stocks.eggs()
cosmetics = client.stocks.cosmetics()
event_shop = client.stocks.event_shop()
traveling_merchant = client.stocks.traveling_merchant()

Weather API

# Get all weather data
weather = client.weather.all()

# Get only active weather events
active_weather = client.weather.active()

Items API

# Get all items (optionally filtered by type)
all_items = client.items.all()
seed_items = client.items.all('seed')

# Get specific item
item = client.items.get('apple')

# Get items by category
seeds = client.items.seeds()
gear = client.items.gear()
eggs = client.items.eggs()
cosmetics = client.items.cosmetics()
events = client.items.events()
pets = client.items.pets()
seedpacks = client.items.seedpacks()
weather_items = client.items.weather()

Calculator API

# Calculate with parameters
result = client.calculator.calculate({
    'Name': 'Apple',
    'Weight': '5.2',
    'Variant': 'Golden'
})

# Get all calculator data
all_data = client.calculator.get_all_data()

Images API

# Get image URL for an item
image_url = client.images.get_url('apple')

Error Handling

import jstudio

try:
    client = jstudio.connect('js_your_key_here')
    stocks = client.stocks.all()
except jstudio.JStudioApiError as e:
    print(f"API Error ({e.status_code}): {e.message}")
    if e.retry_after:
        print(f"Retry after: {e.retry_after} seconds")
except Exception as e:
    print(f"Unexpected error: {e}")

Features

  • Zero dependencies (except requests)
  • Automatic retries with exponential backoff
  • Rate limiting handling
  • Type hints for better IDE support
  • Comprehensive error handling
  • Same API as Node.js version for consistency

Requirements

  • Python 3.7+
  • requests >= 2.25.0

License

MIT License - see LICENSE file for details.

Support

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

jstudio-1.0.0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

jstudio-1.0.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file jstudio-1.0.0.tar.gz.

File metadata

  • Download URL: jstudio-1.0.0.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for jstudio-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3571a101247db8954cfb0623204f99940f9dcdfa6ba5f711cffd741bd80b41cd
MD5 6d857195d80db35c08ee85742693e2cd
BLAKE2b-256 cb434862b7862d1642d193dc9993cb21e5ac00700b521f22e1def958d9413454

See more details on using hashes here.

File details

Details for the file jstudio-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: jstudio-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for jstudio-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d6e21dad4bc7729ba233519cc513d2f281fbee1bdc72f2fdef4f957c27e8204b
MD5 d7ecf92dec4840604a39010ea8b5f443
BLAKE2b-256 876dec7873e82d2e9230a2d713d9b43c437a1e6362a951b6bc0ed4ba05e2255e

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