tks-bot-framework


Nametks-bot-framework JSON
Version 1.0.32 PyPI version JSON
download
home_pageNone
SummaryA bot framework for signal providers for Freya Alpha.
upload_time2024-12-01 20:58:44
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseNone
keywords finance trading models
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # tks-bot-framework
This framework is the basis of every bot. Be it trend-following, ARIMA or AI/ML.

## TODO 
- [ ] Add a push query to listen to updates from Freya Alpha (i.e. the fa-signal-service) and to process them.
- [ ] Add a function that evokes an alert if a sent signal is not confirmed by Freya Alpha within a time threshold.
- [ ] Adapt push_query function to include a WHERE statement:
    push_query = f"""
    SELECT {select_columns} FROM {stream_name}
    WHERE provider_id = '{provider_id_filter}'
    EMIT CHANGES;
    """
    This push_query will be used in a logic that keeps track of the flow of the messages.
- [ ] Parametrize URLs.
- [ ] Reinstall tks-essentials (kafka cluster reduced to single broker for development).
- [ ] Decide on partitions (kafka/sqldb).
- [ ] Decide on keys (kafka/sqldb).
- [ ] Parametrize for exchanges.
- [ ] Grooming of imports, versioning.
- [ ] Adapt commented out tests in test_market_mgr.py (adapt to removed imports)

## General
Run and compiled for Python 3.9.13.

## Development

### Installation as Consuming Developer

Simply run: `pip install tks-bot-framework`

All the required libraries must be listed in requirements.txt and installed by  `py -m pip install -r .\requirements.txt`

Import in modules without the dash (e.g.): `from botframework.portfolio_mgr import PortfolioMgr`

### Setup as Contributor
Create the virtul environment: `py -m venv .venv`
Start the Environment: `./.venv/Scripts/activate`. Use `deactivate`to stop it.
Update the PIP: `py -m pip install --upgrade pip`

All the required libraries must be listed in requirements.txt and installed by  `py -m pip install -r .\requirements.txt`

To cleanup the environment run:
`pip3 freeze > to-uninstall.txt` and then
`pip3 uninstall -y -r to-uninstall.txt`

or `pip3 install pip-autoremove`

### Debug
Simply run the app in debug mode using the existing launch.json (Ctrl+Shift+D) and then run the app with F5.

### Build Library
Prerequisite: make sure that you give your Operating System user the right to modify files in the python directory. The directory where pyhton is installed.
Use `python setup.py bdist_wheel` to create the dist, build and .eggs folder.

## Reference from a different project
In order to use your own version of the project - to maybe contribute to the framework - simply clone the code from github into new directory. Then add the path of that new directory to the requirements.txt file of your project. Then change in botframework whatever you recommend to improve. Don't forget the Open-Closed Principle: extend only (unless it requires a breaking change)

### Releasing a new version

Update the version in the pyproject.toml.

Delete any old files in the /dist folder.
Update your pip: `python -m pip install --upgrade pip`

Install the tools build, twine and bumpver: `python -m pip install build twine bumpver`
Upgrade the setuptools: `pip install --upgrade setuptools`

Bump the version in pyproject.toml: `bumpver update --patch`

Build the project: `python -m build`

Check the distribution: `twine check dist/*`

Upload to test-pypi to validate: `twine upload -r testpypi dist/*`

Login with username: svabra (password should be known)

If the test-upload was successful, finally, upload to pypi production: `twine upload dist/*`

Done.

(P.S. Do not forget to update the framework in your projects: `pip install --upgrade tks-bot-framework`)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "tks-bot-framework",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "finance, trading, models",
    "author": null,
    "author_email": "\"Karin Richner, Brayan Svan\" <hello@thekarasystem.com>",
    "download_url": "https://files.pythonhosted.org/packages/39/d5/e11d122e879afcb6394aa9ae7bdbd6b48e59096d6096bdf15f75a9a8735d/tks_bot_framework-1.0.32.tar.gz",
    "platform": null,
    "description": "# tks-bot-framework\nThis framework is the basis of every bot. Be it trend-following, ARIMA or AI/ML.\n\n## TODO \n- [ ] Add a push query to listen to updates from Freya Alpha (i.e. the fa-signal-service) and to process them.\n- [ ] Add a function that evokes an alert if a sent signal is not confirmed by Freya Alpha within a time threshold.\n- [ ] Adapt push_query function to include a WHERE statement:\n    push_query = f\"\"\"\n    SELECT {select_columns} FROM {stream_name}\n    WHERE provider_id = '{provider_id_filter}'\n    EMIT CHANGES;\n    \"\"\"\n    This push_query will be used in a logic that keeps track of the flow of the messages.\n- [ ] Parametrize URLs.\n- [ ] Reinstall tks-essentials (kafka cluster reduced to single broker for development).\n- [ ] Decide on partitions (kafka/sqldb).\n- [ ] Decide on keys (kafka/sqldb).\n- [ ] Parametrize for exchanges.\n- [ ] Grooming of imports, versioning.\n- [ ] Adapt commented out tests in test_market_mgr.py (adapt to removed imports)\n\n## General\nRun and compiled for Python 3.9.13.\n\n## Development\n\n### Installation as Consuming Developer\n\nSimply run: `pip install tks-bot-framework`\n\nAll the required libraries must be listed in requirements.txt and installed by  `py -m pip install -r .\\requirements.txt`\n\nImport in modules without the dash (e.g.): `from botframework.portfolio_mgr import PortfolioMgr`\n\n### Setup as Contributor\nCreate the virtul environment: `py -m venv .venv`\nStart the Environment: `./.venv/Scripts/activate`. Use `deactivate`to stop it.\nUpdate the PIP: `py -m pip install --upgrade pip`\n\nAll the required libraries must be listed in requirements.txt and installed by  `py -m pip install -r .\\requirements.txt`\n\nTo cleanup the environment run:\n`pip3 freeze > to-uninstall.txt` and then\n`pip3 uninstall -y -r to-uninstall.txt`\n\nor `pip3 install pip-autoremove`\n\n### Debug\nSimply run the app in debug mode using the existing launch.json (Ctrl+Shift+D) and then run the app with F5.\n\n### Build Library\nPrerequisite: make sure that you give your Operating System user the right to modify files in the python directory. The directory where pyhton is installed.\nUse `python setup.py bdist_wheel` to create the dist, build and .eggs folder.\n\n## Reference from a different project\nIn order to use your own version of the project - to maybe contribute to the framework - simply clone the code from github into new directory. Then add the path of that new directory to the requirements.txt file of your project. Then change in botframework whatever you recommend to improve. Don't forget the Open-Closed Principle: extend only (unless it requires a breaking change)\n\n### Releasing a new version\n\nUpdate the version in the pyproject.toml.\n\nDelete any old files in the /dist folder.\nUpdate your pip: `python -m pip install --upgrade pip`\n\nInstall the tools build, twine and bumpver: `python -m pip install build twine bumpver`\nUpgrade the setuptools: `pip install --upgrade setuptools`\n\nBump the version in pyproject.toml: `bumpver update --patch`\n\nBuild the project: `python -m build`\n\nCheck the distribution: `twine check dist/*`\n\nUpload to test-pypi to validate: `twine upload -r testpypi dist/*`\n\nLogin with username: svabra (password should be known)\n\nIf the test-upload was successful, finally, upload to pypi production: `twine upload dist/*`\n\nDone.\n\n(P.S. Do not forget to update the framework in your projects: `pip install --upgrade tks-bot-framework`)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A bot framework for signal providers for Freya Alpha.",
    "version": "1.0.32",
    "project_urls": {
        "Homepage": "https://github.com/The-Kara-System/tks-bot-framework"
    },
    "split_keywords": [
        "finance",
        " trading",
        " models"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6a6f14fb8e3151650e17c0071da79ff86e27b62e9824802312347f716ebe0da3",
                "md5": "a6f6656e74a020f016ec29d2ed615066",
                "sha256": "1c379ae839939950120eb511e32be400d8323423ef32e2427f841309309a6bb6"
            },
            "downloads": -1,
            "filename": "tks_bot_framework-1.0.32-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a6f6656e74a020f016ec29d2ed615066",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 25427,
            "upload_time": "2024-12-01T20:58:43",
            "upload_time_iso_8601": "2024-12-01T20:58:43.440709Z",
            "url": "https://files.pythonhosted.org/packages/6a/6f/14fb8e3151650e17c0071da79ff86e27b62e9824802312347f716ebe0da3/tks_bot_framework-1.0.32-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "39d5e11d122e879afcb6394aa9ae7bdbd6b48e59096d6096bdf15f75a9a8735d",
                "md5": "e6bf167450ad335175988f8ddd702f8d",
                "sha256": "0a0a0a4e82f75318c09e31e9675523aa815b8e9bae752ee4dee0009101e826f2"
            },
            "downloads": -1,
            "filename": "tks_bot_framework-1.0.32.tar.gz",
            "has_sig": false,
            "md5_digest": "e6bf167450ad335175988f8ddd702f8d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 38014,
            "upload_time": "2024-12-01T20:58:44",
            "upload_time_iso_8601": "2024-12-01T20:58:44.687133Z",
            "url": "https://files.pythonhosted.org/packages/39/d5/e11d122e879afcb6394aa9ae7bdbd6b48e59096d6096bdf15f75a9a8735d/tks_bot_framework-1.0.32.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-01 20:58:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "The-Kara-System",
    "github_project": "tks-bot-framework",
    "github_not_found": true,
    "lcname": "tks-bot-framework"
}
        
Elapsed time: 0.36241s