# **Python Simple Blogger library (simple_blogger)** #
This is simple library to make simple blog project with Python.
The library is distributed under the MIT license and can be downloaded and used by anyone.
----------
## How to install ##
To install, you can use the command:
pip3 install simple_blogger
Or download the repository from [GitHub](https://github.com/athenova/simple_blogger)
----------
## Simplest Blogger ##
Use simplest blogger to generate and post simple messages
### Wisher example ###
Uses Deepseek engine to generate a wish text and sends it to Telegram channel.
Adds tag `#haveaniceday` to all posts.
```python
blogger = SimplestBlogger(
builder = PostBuilder(
message_builder=ContentBuilder(
generator=DeepSeekTextGenerator(system_prompt='You are the most optimistic human in the world'),
prompt_builder=IdentityPromptBuilder(f"Wish a nice day to the World, use emojies")
)
),
posters = [
TelegramPoster(processor=TagAdder(['#haveaniceday']))
]
)
blogger.post()
```
### A slightly more complicated horoscope example ###
Sends pisces hororoscope for tomorrow to Telegram Channel and VK group.
```python
class HoroscopeBlogger(SimplestBlogger):
def __init__(self, sign):
tomorrow = datetime.today() + timedelta(days=1)
builder = PostBuilder(
message_builder=ContentBuilder(
generator=DeepSeekTextGenerator(system_prompt='You are a professional astrologist'),
prompt_builder=IdentityPromptBuilder(f"Make a a horoscope on {tomorrow.strftime('%Y-%m-%d')} for '{sign}', use emojies, use less than 300 words")
)
)
processor = TagAdder(['#horoscope', '#astrology', f"#{sign}"])
posters = [
TelegramPoster(processor=processor),
VkPoster(processor=processor)
]
super().__init__(builder, posters)
pisces_blogger = HoroscopeBlogger(sign='pisces')
pisces_blogger.post()
```
### Environment variables ###
Library uses `dall-e-3` model to generate images and `deepseek-chat` to generate texts by default and sends publications to telegram channels.
It needs following environment variables:
- BLOGGER_BOT_TOKEN
- OPENAI_API_KEY
- DEEPSEEK_API_KEY
Yandex generators needs following environment variables:
- YC_API_KEY
- YC_FOLDER_ID
## From the developer ##
> There are(or will be) more examples of using this library in sibling repos on [GitHub](https://github.com/athenova/simple_blogger)
Raw data
{
"_id": null,
"home_page": "https://github.com/athenova/simple_blogger",
"name": "simple-blogger",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10.6",
"maintainer_email": null,
"keywords": "python blog ai",
"author": "Aleksey Sergeyev",
"author_email": "aleksey.sergeyev@yandex.com",
"download_url": "https://files.pythonhosted.org/packages/91/c8/ab5ce58c29a4c154d30b071a455557a24127e7bf2c60b90ffd7efdeaf18a/simple_blogger-0.2.14.tar.gz",
"platform": null,
"description": "# **Python Simple Blogger library (simple_blogger)** #\r\n\r\nThis is simple library to make simple blog project with Python. \r\nThe library is distributed under the MIT license and can be downloaded and used by anyone.\r\n\r\n----------\r\n\r\n## How to install ##\r\n\r\nTo install, you can use the command:\r\n\r\n pip3 install simple_blogger\r\n\r\nOr download the repository from [GitHub](https://github.com/athenova/simple_blogger)\r\n\r\n----------\r\n\r\n## Simplest Blogger ##\r\n\r\nUse simplest blogger to generate and post simple messages\r\n\r\n### Wisher example ###\r\n\r\nUses Deepseek engine to generate a wish text and sends it to Telegram channel. \r\nAdds tag `#haveaniceday` to all posts. \r\n\r\n```python\r\nblogger = SimplestBlogger(\r\n builder = PostBuilder(\r\n message_builder=ContentBuilder(\r\n generator=DeepSeekTextGenerator(system_prompt='You are the most optimistic human in the world'),\r\n prompt_builder=IdentityPromptBuilder(f\"Wish a nice day to the World, use emojies\")\r\n )\r\n ),\r\n posters = [\r\n TelegramPoster(processor=TagAdder(['#haveaniceday']))\r\n ]\r\n)\r\nblogger.post()\r\n```\r\n\r\n### A slightly more complicated horoscope example ###\r\n\r\nSends pisces hororoscope for tomorrow to Telegram Channel and VK group.\r\n\r\n```python\r\nclass HoroscopeBlogger(SimplestBlogger):\r\n def __init__(self, sign):\r\n tomorrow = datetime.today() + timedelta(days=1)\r\n builder = PostBuilder(\r\n message_builder=ContentBuilder(\r\n generator=DeepSeekTextGenerator(system_prompt='You are a professional astrologist'),\r\n prompt_builder=IdentityPromptBuilder(f\"Make a a horoscope on {tomorrow.strftime('%Y-%m-%d')} for '{sign}', use emojies, use less than 300 words\")\r\n )\r\n )\r\n processor = TagAdder(['#horoscope', '#astrology', f\"#{sign}\"])\r\n posters = [\r\n TelegramPoster(processor=processor),\r\n VkPoster(processor=processor)\r\n ]\r\n super().__init__(builder, posters)\r\n\r\npisces_blogger = HoroscopeBlogger(sign='pisces')\r\npisces_blogger.post()\r\n```\r\n\r\n### Environment variables ###\r\n\r\nLibrary uses `dall-e-3` model to generate images and `deepseek-chat` to generate texts by default and sends publications to telegram channels.\r\nIt needs following environment variables:\r\n- BLOGGER_BOT_TOKEN\r\n- OPENAI_API_KEY\r\n- DEEPSEEK_API_KEY\r\n\r\nYandex generators needs following environment variables:\r\n- YC_API_KEY\r\n- YC_FOLDER_ID\r\n\r\n\r\n## From the developer ##\r\n\r\n> There are(or will be) more examples of using this library in sibling repos on [GitHub](https://github.com/athenova/simple_blogger)\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A simple blogger library",
"version": "0.2.14",
"project_urls": {
"Documentation": "https://github.com/athenova/simple_blogger",
"Homepage": "https://github.com/athenova/simple_blogger"
},
"split_keywords": [
"python",
"blog",
"ai"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "446d2c1273a1cafbc9c8b27a2316e564e39738e2b34bcc7c43170295d1707c59",
"md5": "eed695ca5dddf4a0ece3be328609c284",
"sha256": "3ba5c7dd7c8c4e90944709d5bf7c050b37e1fc9eb5284f4bd3c13b7bd3b648f7"
},
"downloads": -1,
"filename": "simple_blogger-0.2.14-py3-none-any.whl",
"has_sig": false,
"md5_digest": "eed695ca5dddf4a0ece3be328609c284",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10.6",
"size": 30991,
"upload_time": "2025-10-12T13:16:43",
"upload_time_iso_8601": "2025-10-12T13:16:43.760258Z",
"url": "https://files.pythonhosted.org/packages/44/6d/2c1273a1cafbc9c8b27a2316e564e39738e2b34bcc7c43170295d1707c59/simple_blogger-0.2.14-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "91c8ab5ce58c29a4c154d30b071a455557a24127e7bf2c60b90ffd7efdeaf18a",
"md5": "0f884360764513e45dd73dbc900e3900",
"sha256": "90653b43b9352c4ff365d665abb66ddcfdbac14d82689956ff2b0b5ced76b9bf"
},
"downloads": -1,
"filename": "simple_blogger-0.2.14.tar.gz",
"has_sig": false,
"md5_digest": "0f884360764513e45dd73dbc900e3900",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10.6",
"size": 19408,
"upload_time": "2025-10-12T13:16:44",
"upload_time_iso_8601": "2025-10-12T13:16:44.870593Z",
"url": "https://files.pythonhosted.org/packages/91/c8/ab5ce58c29a4c154d30b071a455557a24127e7bf2c60b90ffd7efdeaf18a/simple_blogger-0.2.14.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-12 13:16:44",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "athenova",
"github_project": "simple_blogger",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "simple-blogger"
}