vargur-sdk


Namevargur-sdk JSON
Version 0.1.3 PyPI version JSON
download
home_pagehttps://github.com/meloncafe/vargur-sdk
SummaryA powerful SDK for building extensible applications with plugin support
upload_time2024-07-13 05:02:56
maintainerNone
docs_urlNone
authorMelonCafe
requires_python>=3.11
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Vargur SDK

Vargur SDK is a powerful toolkit for building extensible applications with plugin support. It provides a core set of features including database integration, caching, event bus, and authentication, along with a plugin system that allows easy extension of functionality.

## Features

- Plugin system for easy extensibility
- Mock implementations for database integration, caching, event bus, and authentication
- Minimal dependencies for flexibility in implementation

## Installation

You can install Vargur SDK using pip:

```
pip install vargur_sdk
```

## Usage

Here's a basic example of how to use Vargur SDK:

```python
from fastapi import FastAPI
from vargur_sdk import Plugin, load_plugins, event_bus

app = FastAPI()

class MyPlugin(Plugin):
    def __init__(self):
        super().__init__("my_plugin")
        self.router.add_api_route("/hello", self.hello)

    async def hello(self):
        return {"message": "Hello from my plugin!"}

# Load all plugins
plugins = load_plugins()
plugins["my_plugin"] = MyPlugin()

# Include plugin routers
for plugin in plugins.values():
    app.include_router(plugin.router)

# Example of using the event bus
@app.post("/trigger_event")
async def trigger_event():
    await event_bus.publish("some_event", data="Some data")
    return {"message": "Event triggered"}

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)
```

## Components

- **Plugin**: Base class for creating plugins
- **Config**: Configuration settings for the SDK
- **Database**: Mock database session provider
- **Cache**: Mock caching implementation
- **EventBus**: Mock event publishing and subscribing system
- **Authentication**: Mock user authentication

## Configuration

Vargur SDK uses a `Config` class for configuration. You can modify these settings in your application:

```python
from vargur_sdk import config

config.DEBUG = True
config.LOG_LEVEL = "DEBUG"
config.DATABASE_URL = "your_database_url"
config.SECRET_KEY = "your_secret_key"
```

## Documentation

For more detailed information, please refer to the following documentation:

- [User Guide](https://meloncafe.github.io/vargur-sdk/user-guide)
- [API Reference](https://meloncafe.github.io/vargur-sdk/api-reference)
- [Plugin Guidelines](https://meloncafe.github.io/vargur-sdk/plugin-guidelines)

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the [MIT License](LICENSE).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/meloncafe/vargur-sdk",
    "name": "vargur-sdk",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": null,
    "author": "MelonCafe",
    "author_email": "contact@siege-green.com",
    "download_url": "https://files.pythonhosted.org/packages/e5/4f/d48e0a7e6d250b3b61504732d0497e21c7cc6d7ec8efbde7a84d875c7de7/vargur-sdk-0.1.3.tar.gz",
    "platform": null,
    "description": "# Vargur SDK\n\nVargur SDK is a powerful toolkit for building extensible applications with plugin support. It provides a core set of features including database integration, caching, event bus, and authentication, along with a plugin system that allows easy extension of functionality.\n\n## Features\n\n- Plugin system for easy extensibility\n- Mock implementations for database integration, caching, event bus, and authentication\n- Minimal dependencies for flexibility in implementation\n\n## Installation\n\nYou can install Vargur SDK using pip:\n\n```\npip install vargur_sdk\n```\n\n## Usage\n\nHere's a basic example of how to use Vargur SDK:\n\n```python\nfrom fastapi import FastAPI\nfrom vargur_sdk import Plugin, load_plugins, event_bus\n\napp = FastAPI()\n\nclass MyPlugin(Plugin):\n    def __init__(self):\n        super().__init__(\"my_plugin\")\n        self.router.add_api_route(\"/hello\", self.hello)\n\n    async def hello(self):\n        return {\"message\": \"Hello from my plugin!\"}\n\n# Load all plugins\nplugins = load_plugins()\nplugins[\"my_plugin\"] = MyPlugin()\n\n# Include plugin routers\nfor plugin in plugins.values():\n    app.include_router(plugin.router)\n\n# Example of using the event bus\n@app.post(\"/trigger_event\")\nasync def trigger_event():\n    await event_bus.publish(\"some_event\", data=\"Some data\")\n    return {\"message\": \"Event triggered\"}\n\nif __name__ == \"__main__\":\n    import uvicorn\n    uvicorn.run(app, host=\"0.0.0.0\", port=8000)\n```\n\n## Components\n\n- **Plugin**: Base class for creating plugins\n- **Config**: Configuration settings for the SDK\n- **Database**: Mock database session provider\n- **Cache**: Mock caching implementation\n- **EventBus**: Mock event publishing and subscribing system\n- **Authentication**: Mock user authentication\n\n## Configuration\n\nVargur SDK uses a `Config` class for configuration. You can modify these settings in your application:\n\n```python\nfrom vargur_sdk import config\n\nconfig.DEBUG = True\nconfig.LOG_LEVEL = \"DEBUG\"\nconfig.DATABASE_URL = \"your_database_url\"\nconfig.SECRET_KEY = \"your_secret_key\"\n```\n\n## Documentation\n\nFor more detailed information, please refer to the following documentation:\n\n- [User Guide](https://meloncafe.github.io/vargur-sdk/user-guide)\n- [API Reference](https://meloncafe.github.io/vargur-sdk/api-reference)\n- [Plugin Guidelines](https://meloncafe.github.io/vargur-sdk/plugin-guidelines)\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A powerful SDK for building extensible applications with plugin support",
    "version": "0.1.3",
    "project_urls": {
        "Bug Tracker": "https://github.com/meloncafe/vargur-sdk/issues",
        "Documentation": "https://vargur-sdk.siege-green.com/",
        "Homepage": "https://github.com/meloncafe/vargur-sdk",
        "Source Code": "https://github.com/meloncafe/vargur-sdk"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2b9bf95e9f2eb511c644d4ffab8a066a51bf71b4daac41a2f58ee0d9eb582fdd",
                "md5": "80aa9ca9c2aa558206fc90ddb3e602e1",
                "sha256": "93923d7e98fef43c59d3ca3d0ba5f84b2da1b5e15369e086b3c5f8e1f18c21c1"
            },
            "downloads": -1,
            "filename": "vargur_sdk-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "80aa9ca9c2aa558206fc90ddb3e602e1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 5646,
            "upload_time": "2024-07-13T05:02:55",
            "upload_time_iso_8601": "2024-07-13T05:02:55.584570Z",
            "url": "https://files.pythonhosted.org/packages/2b/9b/f95e9f2eb511c644d4ffab8a066a51bf71b4daac41a2f58ee0d9eb582fdd/vargur_sdk-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e54fd48e0a7e6d250b3b61504732d0497e21c7cc6d7ec8efbde7a84d875c7de7",
                "md5": "141197b02e9ba64a1054d205b7ff9c53",
                "sha256": "644cf44449a34106b2b4a8175e1e29d2b68f4a8037ce49bedf8e0f5ab3deb6b3"
            },
            "downloads": -1,
            "filename": "vargur-sdk-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "141197b02e9ba64a1054d205b7ff9c53",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 50960,
            "upload_time": "2024-07-13T05:02:56",
            "upload_time_iso_8601": "2024-07-13T05:02:56.794883Z",
            "url": "https://files.pythonhosted.org/packages/e5/4f/d48e0a7e6d250b3b61504732d0497e21c7cc6d7ec8efbde7a84d875c7de7/vargur-sdk-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-13 05:02:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "meloncafe",
    "github_project": "vargur-sdk",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "vargur-sdk"
}
        
Elapsed time: 0.29928s