Python Faker Blog Provider
Python Faker Blog Content Provider
Description
This Python package provides a Faker provider that generates fake blog content in Brazilian Portuguese. It consists of various methods that can be used to create blog-related fake data such as blog titles, blog posts, images, tags, and more.
Installation
Use pip for install from source in PyPI:
pip install faker-blog-provider
Tests
Use pytest to test the project:
pytest -vvsx
Usage
Import the Faker class from the faker package and initialize an instance of it. Then, import the BlogProvider class from the faker_blog module. Finally, add the BlogProvider to the instance of Faker.
from faker import Faker
from faker_blog import BlogProvider
fake = Faker()
fake.add_provider(BlogProvider)
# Generate fake blog content
title = fake.article_title()
image = fake.article_image()
tag = fake.article_tag()
tags = fake.article_tags(nb=5)
category = fake.article_category()
image = fake.article_image()
content_html = fake.article_content_html()
# You can generate a dictionary containing the text and a slugified version using the following methods.
title = fake.article_title_and_slug()
tag = fake.article_tag_and_slug()
tags = fake.article_tags_and_slug(nb=5)
category = fake.article_category_and_slug()
Features
- Generate fake blog titles
- Generate fake blog posts content
- Generate fake blog tag and tags
- Generate fake blog category
- Generate fake URLs for blog image using the Lorem Picsum
Examples
Generate a fake blog title:
title = fake.article_title()
print(title)
Output:
Os Segredos De Dirigir Um Poderoso Grupo
Generate fake blog tags:
tags = fake.article_tags(nb=5)
print(tags)
Output:
['Transformação Pessoal', 'Gestão do Tempo', 'Estratégias de Crescimento', 'Automação', 'Desenvolvimento Sustentável']
Generate fake blog tags with slug:
tags_and_slug = fake.article_tags_and_slug(nb=3)
print(tags_and_slug)
Output:
[{'tag': 'Ferramentas para Empreendedores', 'slug': 'ferramentas-para-empreendedores'}, {'tag': 'Transformação Digital', 'slug': 'transformacao-digital'}, {'tag': 'Cultura Empresarial', 'slug': 'cultura-empresarial'}]
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for faker-blog-provider 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| faker_blog_provider-0.0.3.tar.gz | 11.4 kB | Without provenance | Details for faker_blog_provider-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| faker_blog_provider-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for faker_blog_provider-0.0.3-py3-none-any.whl |
Total release size: 21.7 kB
Release files / faker_blog_provider-0.0.3.tar.gz
| Download URL | faker_blog_provider-0.0.3.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c388a1e1ef6aeaf155402dbe435d957138c6bdb6b1970ab12a9b7e14e55ee904
|
|
BLAKE2b-256 checksum How to use checksums |
1a0851895b9bfec11a1ae5224f933a58b3a22d43bd676a896fc73529e92b1aee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Release files / faker_blog_provider-0.0.3-py3-none-any.whl
| Download URL | faker_blog_provider-0.0.3-py3-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
347fa02b6df644e846b27af1d9a859fde0a4521f95cf858793a7466b5ea8b438
|
|
BLAKE2b-256 checksum How to use checksums |
bc8e55a51ca2a86987239c56a4a14c8202fd5f48df2252ddd9da127d782c8b16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Security for faker-blog-provider 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.