jgtcore
Core library for JGT utilities - configuration, settings, and utility functions.
This is a pure Python library extracted from jgtutils to provide clean programmatic access to JGT configuration and settings without CLI dependencies.
Installation
pip install jgtcore
Usage
Simple Configuration Access
import jgtcore
# Load configuration
config = jgtcore.get_config()
demo_config = jgtcore.get_config(demo=True)
# Get specific config values
user_id = jgtcore.get_config_value('user_id')
quotes_count = jgtcore.get_config_value('quotes_count', 1000)
Settings Management
import jgtcore
# Get all settings
settings = jgtcore.get_settings()
# Get specific setting with default
instrument = jgtcore.get_setting('instrument', 'EUR/USD')
timeframes = jgtcore.get_setting('_timeframes', 'D1')
Environment Setup
import jgtcore
# One-call environment setup
config, settings = jgtcore.setup_environment(demo=True)
# Check demo mode
if jgtcore.is_demo_mode():
print("Running in demo mode")
Advanced Usage
from jgtcore import readconfig, load_settings
# Load with specific options
config = readconfig(demo=True, export_env=True)
settings = load_settings(custom_path="/path/to/settings.json")
Configuration Files
- config.json: Trading credentials and connection settings
- settings.json: Application settings and preferences
See examples/ directory for sample configuration files.
File Locations
config.json lookup order:
- Current directory:
config.json - User home:
~/.jgt/config.json - System:
/etc/jgt/config.json - Environment variables:
JGT_CONFIG,JGT_CONFIG_PATH
settings.json lookup order:
- System:
/etc/jgt/settings.json - User home:
~/.jgt/settings.json - Current directory:
.jgt/settings.json - YAML variants:
jgt.yml,_config.yml - Environment variables:
JGT_SETTINGS
License
MIT License
Metadata
Release files for jgtcore 0.2.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jgtcore-0.2.6.tar.gz | 37.7 kB | Without provenance | Details for jgtcore-0.2.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jgtcore-0.2.6-py3-none-any.whl | Python 3 | none | any | Details for jgtcore-0.2.6-py3-none-any.whl |
Total release size: 79.8 kB
Release files / jgtcore-0.2.6.tar.gz
| Download URL | jgtcore-0.2.6.tar.gz |
|---|---|
| Size | 37.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fdea89031acf2ba0df8fc3590ae919a124a97d19de939c3b62570f0ebb19ecba
|
|
BLAKE2b-256 checksum How to use checksums |
0c70258fa5f3b8b75c1b82f556c316c147d9b9cfd1db3b83e88e63f3d8716cab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.4
|
Release files / jgtcore-0.2.6-py3-none-any.whl
| Download URL | jgtcore-0.2.6-py3-none-any.whl |
|---|---|
| Size | 42.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7f057eeb90c005516c4b5c913df081161c712ed21eff85346c2c7d3febbf905d
|
|
BLAKE2b-256 checksum How to use checksums |
0c9aa6e24925ca9f4c6f8f3e54c7b01496bc3c23978501cdc88c61419146ba40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.4
|
Security for jgtcore 0.2.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.