jgtcore


Namejgtcore JSON
Version 0.2.5 PyPI version JSON
download
home_pageNone
SummaryComprehensive core library for JGT applications - migrated from jgtutils with full compatibility
upload_time2025-07-11 20:30:03
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseNone
keywords configuration settings utilities jgt trading fx cli logging
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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

```bash
pip install jgtcore
```

## Usage

### Simple Configuration Access
```python
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
```python
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
```python
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
```python
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:
1. Current directory: `config.json`
2. User home: `~/.jgt/config.json`
3. System: `/etc/jgt/config.json`
4. Environment variables: `JGT_CONFIG`, `JGT_CONFIG_PATH`

### settings.json lookup order:
1. System: `/etc/jgt/settings.json`
2. User home: `~/.jgt/settings.json`
3. Current directory: `.jgt/settings.json`
4. YAML variants: `jgt.yml`, `_config.yml`
5. Environment variables: `JGT_SETTINGS`

## License

MIT License

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "jgtcore",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "configuration, settings, utilities, jgt, trading, fx, cli, logging",
    "author": null,
    "author_email": "Guillaume Isabelle <jgi@jgwill.com>",
    "download_url": "https://files.pythonhosted.org/packages/06/b1/d4bd3bc21002b7ed674e525e36465d4caee6ac6ad99e797392b899be0836/jgtcore-0.2.5.tar.gz",
    "platform": null,
    "description": "# jgtcore\n\nCore library for JGT utilities - configuration, settings, and utility functions.\n\nThis is a pure Python library extracted from `jgtutils` to provide clean programmatic access to JGT configuration and settings without CLI dependencies.\n\n## Installation\n\n```bash\npip install jgtcore\n```\n\n## Usage\n\n### Simple Configuration Access\n```python\nimport jgtcore\n\n# Load configuration\nconfig = jgtcore.get_config()\ndemo_config = jgtcore.get_config(demo=True)\n\n# Get specific config values\nuser_id = jgtcore.get_config_value('user_id')\nquotes_count = jgtcore.get_config_value('quotes_count', 1000)\n```\n\n### Settings Management\n```python\nimport jgtcore\n\n# Get all settings\nsettings = jgtcore.get_settings()\n\n# Get specific setting with default\ninstrument = jgtcore.get_setting('instrument', 'EUR/USD')\ntimeframes = jgtcore.get_setting('_timeframes', 'D1')\n```\n\n### Environment Setup\n```python\nimport jgtcore\n\n# One-call environment setup\nconfig, settings = jgtcore.setup_environment(demo=True)\n\n# Check demo mode\nif jgtcore.is_demo_mode():\n    print(\"Running in demo mode\")\n```\n\n### Advanced Usage\n```python\nfrom jgtcore import readconfig, load_settings\n\n# Load with specific options\nconfig = readconfig(demo=True, export_env=True)\nsettings = load_settings(custom_path=\"/path/to/settings.json\")\n```\n\n## Configuration Files\n\n- **config.json**: Trading credentials and connection settings\n- **settings.json**: Application settings and preferences\n\nSee `examples/` directory for sample configuration files.\n\n## File Locations\n\n### config.json lookup order:\n1. Current directory: `config.json`\n2. User home: `~/.jgt/config.json`\n3. System: `/etc/jgt/config.json`\n4. Environment variables: `JGT_CONFIG`, `JGT_CONFIG_PATH`\n\n### settings.json lookup order:\n1. System: `/etc/jgt/settings.json`\n2. User home: `~/.jgt/settings.json`\n3. Current directory: `.jgt/settings.json`\n4. YAML variants: `jgt.yml`, `_config.yml`\n5. Environment variables: `JGT_SETTINGS`\n\n## License\n\nMIT License\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Comprehensive core library for JGT applications - migrated from jgtutils with full compatibility",
    "version": "0.2.5",
    "project_urls": {
        "Bug Tracker": "https://github.com/jgwill/jgtcore/issues",
        "Documentation": "https://github.com/jgwill/jgtcore#readme",
        "Homepage": "https://github.com/jgwill/jgtcore",
        "Source Code": "https://github.com/jgwill/jgtcore"
    },
    "split_keywords": [
        "configuration",
        " settings",
        " utilities",
        " jgt",
        " trading",
        " fx",
        " cli",
        " logging"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6360e638ab67324bab1ec28ceb38c25f2d4a74f5950128c7170cfb205e109728",
                "md5": "e11c9682c59a93fae95ee9bcbbad7a04",
                "sha256": "220745750f10023ddb3205fa51f983b5eaf247ef6fd43266f068ca11601eed49"
            },
            "downloads": -1,
            "filename": "jgtcore-0.2.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e11c9682c59a93fae95ee9bcbbad7a04",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 37885,
            "upload_time": "2025-07-11T20:30:01",
            "upload_time_iso_8601": "2025-07-11T20:30:01.803840Z",
            "url": "https://files.pythonhosted.org/packages/63/60/e638ab67324bab1ec28ceb38c25f2d4a74f5950128c7170cfb205e109728/jgtcore-0.2.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "06b1d4bd3bc21002b7ed674e525e36465d4caee6ac6ad99e797392b899be0836",
                "md5": "16fbc5806b590b7ea486653381947315",
                "sha256": "d5c5b425fe957c7f2e789cf0792823825e9b536311cc980faaf6079d7ded2b0f"
            },
            "downloads": -1,
            "filename": "jgtcore-0.2.5.tar.gz",
            "has_sig": false,
            "md5_digest": "16fbc5806b590b7ea486653381947315",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 33822,
            "upload_time": "2025-07-11T20:30:03",
            "upload_time_iso_8601": "2025-07-11T20:30:03.184928Z",
            "url": "https://files.pythonhosted.org/packages/06/b1/d4bd3bc21002b7ed674e525e36465d4caee6ac6ad99e797392b899be0836/jgtcore-0.2.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-11 20:30:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jgwill",
    "github_project": "jgtcore",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "jgtcore"
}
        
Elapsed time: 0.85248s