# **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/3c/37/c4981c70fb624cca46eb9c53dfc17fa4095e94aa7796aee1b09e59b03b26/simple_blogger-0.2.9.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.9",
"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": "bd7739f93f58255106a3b98f2b7ed9084805a9d22ebbe41025865e832b56b900",
"md5": "172aefd847ad229506bcb944d85c166f",
"sha256": "d2d9b9585494eae2a127d0d461bad26b45414f82c1595fb9c6c2cd7a29f02f51"
},
"downloads": -1,
"filename": "simple_blogger-0.2.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "172aefd847ad229506bcb944d85c166f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10.6",
"size": 30755,
"upload_time": "2025-08-10T12:37:29",
"upload_time_iso_8601": "2025-08-10T12:37:29.636714Z",
"url": "https://files.pythonhosted.org/packages/bd/77/39f93f58255106a3b98f2b7ed9084805a9d22ebbe41025865e832b56b900/simple_blogger-0.2.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "3c37c4981c70fb624cca46eb9c53dfc17fa4095e94aa7796aee1b09e59b03b26",
"md5": "88e803fea20dfe6067431c0cb393954e",
"sha256": "4723989b68bd6c9ec2383c19f6be1ec3730fba12a15c97f993db65cc182b6798"
},
"downloads": -1,
"filename": "simple_blogger-0.2.9.tar.gz",
"has_sig": false,
"md5_digest": "88e803fea20dfe6067431c0cb393954e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10.6",
"size": 19229,
"upload_time": "2025-08-10T12:37:30",
"upload_time_iso_8601": "2025-08-10T12:37:30.955827Z",
"url": "https://files.pythonhosted.org/packages/3c/37/c4981c70fb624cca46eb9c53dfc17fa4095e94aa7796aee1b09e59b03b26/simple_blogger-0.2.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-10 12:37:30",
"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"
}