Skip to main content

A simple blogger library

Project description

PythonSimpleBlogger 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


Initialization

Just start with a simple code.

blogger = simple_blogger.CommonBlogger(PUT-YOUR-TELEGRAM-PRIVATE-CHAT-ID-IN-HERE)
blogger.init_project()

It initalizes folder structure of your own blog project in the working directory.

Blog topics

Find project ideas json-file in files/ideas folder. Fill it with topics and categories of your blog.

Creating tasks

Call push.

blogger.push()

It creates tasks json-file in files folder with dates of publications and prompts to AI that generate image and text for topics.

Adding Tasks

Put any json-file in files/ideas folder. It has to be idea-structured. You can put as many idea-files in idea folder as you want.

Call revert to put unhandled tasks back in backlog.

blogger.revert()

Call push again. Now all backloged tasks and new ideas are in progress.

Publication Review

Call review to send tommorow's publication to your private telegram channel.

blogger.review()

Publication

Call send to send today's publication to your public telegram channel.

blogger.send()

Note: call review before send or call send with image_gen=True(to produce image) and text_gen=True(to produce text).

Error handling

If something goes wrong method sends Exception text to your private telegram channel.

Default parameters

Library uses working directory name as project name and production telegram channel name by default.

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simple_blogger-0.2.15.tar.gz (18.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simple_blogger-0.2.15-py3-none-any.whl (30.6 kB view details)

Uploaded Python 3

File details

Details for the file simple_blogger-0.2.15.tar.gz.

File metadata

  • Download URL: simple_blogger-0.2.15.tar.gz
  • Upload date:
  • Size: 18.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for simple_blogger-0.2.15.tar.gz
Algorithm Hash digest
SHA256 b402e7936178b621aaf8c6669007ccc0a47621668220110c8ab120dec084f495
MD5 08a1f7e685759c94a4804ea0433278bc
BLAKE2b-256 f03752e96e91ed17334851cca9e69bb12d5c1b7dfbe6d4f5bf6270d395cfb78e

See more details on using hashes here.

Provenance

The following attestation bundles were made for simple_blogger-0.2.15.tar.gz:

Publisher: publish-to-pypi.yml on athenova/simple_blogger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file simple_blogger-0.2.15-py3-none-any.whl.

File metadata

File hashes

Hashes for simple_blogger-0.2.15-py3-none-any.whl
Algorithm Hash digest
SHA256 df78880afb702627ad0f4334d489caad70bce8ef7a90b5e82da9aa1cb8be8b40
MD5 879d1b49597e6ed31cbfd49b4e2db723
BLAKE2b-256 3be36db0553aebffc0c9c4d0f89cfe833db5d974f0ed6b2bc6ea975263c4ed3a

See more details on using hashes here.

Provenance

The following attestation bundles were made for simple_blogger-0.2.15-py3-none-any.whl:

Publisher: publish-to-pypi.yml on athenova/simple_blogger

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page