python-yeet


Namepython-yeet JSON
Version 1.0.2 PyPI version JSON
download
home_page
Summaryyeet is a simple Python framework
upload_time2023-03-28 09:04:50
maintainer
docs_urlNone
authorYakser
requires_python>=3.9,<4.0
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # [what's a yeet?](https://www.youtube.com/watch?v=fVva0bV0odg)

# quickstart

## Run app
```python
import os
from controllers import HomeController, ArticlesController
from examples.constants import INIT_QUERIES, DB_SETTINGS
from python_yeet.app import Yeet
from python_yeet.db import Database

app = Yeet(name=os.path.basename(os.getcwd()))
app.add_route(r'^articles/$', ArticlesController(methods=['GET', 'POST']))
app.add_route(r'^.*$', HomeController)
db = Database(db_settings=DB_SETTINGS,
              init_queries=INIT_QUERIES)
app.run()
```

## Create model example

```python
import datetime
from python_yeet.orm import BaseModel, BaseManager


class Article(BaseModel):
    table_name = "articles"
    manager_class = BaseManager

    id: int
    title: str
    text: str
    author: int
    created_at: datetime.datetime
```

## Create controller example

```python
from examples.models.article import Article
from python_yeet.controllers import BaseController


class ArticlesController(BaseController):
    def get(self, path):
        return self.render_template('articles.html', articles=self._get_articles())
        
   
    @staticmethod
    def _get_articles():
        articles = Article.objects.select("id", "title")
        return articles
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "python-yeet",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Yakser",
    "author_email": "iaksanov2044@mail.ru",
    "download_url": "https://files.pythonhosted.org/packages/e8/72/ffd2d5269c4bec910d99c22c5f1e90274a6452866638816228efe5e9b826/python_yeet-1.0.2.tar.gz",
    "platform": null,
    "description": "# [what's a yeet?](https://www.youtube.com/watch?v=fVva0bV0odg)\n\n# quickstart\n\n## Run app\n```python\nimport os\nfrom controllers import HomeController, ArticlesController\nfrom examples.constants import INIT_QUERIES, DB_SETTINGS\nfrom python_yeet.app import Yeet\nfrom python_yeet.db import Database\n\napp = Yeet(name=os.path.basename(os.getcwd()))\napp.add_route(r'^articles/$', ArticlesController(methods=['GET', 'POST']))\napp.add_route(r'^.*$', HomeController)\ndb = Database(db_settings=DB_SETTINGS,\n              init_queries=INIT_QUERIES)\napp.run()\n```\n\n## Create model example\n\n```python\nimport datetime\nfrom python_yeet.orm import BaseModel, BaseManager\n\n\nclass Article(BaseModel):\n    table_name = \"articles\"\n    manager_class = BaseManager\n\n    id: int\n    title: str\n    text: str\n    author: int\n    created_at: datetime.datetime\n```\n\n## Create controller example\n\n```python\nfrom examples.models.article import Article\nfrom python_yeet.controllers import BaseController\n\n\nclass ArticlesController(BaseController):\n    def get(self, path):\n        return self.render_template('articles.html', articles=self._get_articles())\n        \n   \n    @staticmethod\n    def _get_articles():\n        articles = Article.objects.select(\"id\", \"title\")\n        return articles\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "yeet is a simple Python framework",
    "version": "1.0.2",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b57137b2f3076416349fa9802cf6404b3fe413c042ee672066bb59ffd347e09b",
                "md5": "5d80c1d7cba55c85eb09a944a9991598",
                "sha256": "f01f84983cc2fa24eed41c628b72ef56d49c5bf0b2b31975671eb6e9e7ffdcf4"
            },
            "downloads": -1,
            "filename": "python_yeet-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5d80c1d7cba55c85eb09a944a9991598",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<4.0",
            "size": 7404,
            "upload_time": "2023-03-28T09:04:48",
            "upload_time_iso_8601": "2023-03-28T09:04:48.968964Z",
            "url": "https://files.pythonhosted.org/packages/b5/71/37b2f3076416349fa9802cf6404b3fe413c042ee672066bb59ffd347e09b/python_yeet-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e872ffd2d5269c4bec910d99c22c5f1e90274a6452866638816228efe5e9b826",
                "md5": "6a8a6a874de4aab851939d2f80fb7c00",
                "sha256": "e47b2cef3322b9e4983ca6e649a99e78a1e50d587e6ddb65b8f8a31ccca5eac4"
            },
            "downloads": -1,
            "filename": "python_yeet-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "6a8a6a874de4aab851939d2f80fb7c00",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<4.0",
            "size": 5691,
            "upload_time": "2023-03-28T09:04:50",
            "upload_time_iso_8601": "2023-03-28T09:04:50.612213Z",
            "url": "https://files.pythonhosted.org/packages/e8/72/ffd2d5269c4bec910d99c22c5f1e90274a6452866638816228efe5e9b826/python_yeet-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-28 09:04:50",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "python-yeet"
}
        
Elapsed time: 0.05455s