Skip to main content

A package for blog-related utilities

Project description

MyBlogUtils

MyBlogUtils is a Python package for managing blog content. It provides a set of utility functions for creating and managing blog posts, generating RSS feeds, and more.

Installation

To install MyBlogUtils, use pip:

pip install myblogutils

Usage

Here are some examples of how to use the functions provided by MyBlogUtils:

from myblogutils import create_post,read_file, write_file, generate_slug,send_email

Example usage of write_file function

filename = 'example.txt' contents = 'This is some example text.' write_file(filename, contents)

Create a new blog post

title = "This is a blogpost " author = "Arvind Srivastav " tags = ["Python", "Blogging","Blog"] filename = create_post(title, author, tags) print(f"New post created: {filename}")

Functions Here are the functions provided by MyBlogUtils:

create_post- create_post(title: str, author: str, tags: List[str]) -> str

Example usage of generate_slug function

title = 'My First Blog Post' slug = generate_slug(title) print(slug)

prints 'my-first-blog-post'

Example usage of send_email function

to = 'recipient@example.com' subject = 'New blog post' body = f'A new blog post "{slug}" was published on {now}!' send_email(to, subject, body)

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

blogutils-0.0.2.tar.gz (2.9 kB view details)

Uploaded Source

File details

Details for the file blogutils-0.0.2.tar.gz.

File metadata

  • Download URL: blogutils-0.0.2.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for blogutils-0.0.2.tar.gz
Algorithm Hash digest
SHA256 aa2caf158d6fcd25cb2a656570e43581e384a77bb297884ba8d3adfa3281e13b
MD5 ba7ef600f4b6ca4b2681fb2291e19133
BLAKE2b-256 8135a10b2f545db64b535b8f7b724fb5c97cab9e0d3eadb6777eab0d5c0c9ba0

See more details on using hashes here.

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