Skip to main content

A library to generate random markdown text

Project description


Build Status

Coverage Status

A library to generate random markdown text.

But why?

I was making a blog web-app that lets its users write blog posts using markdown syntax. I couldn't find any python package that does this easily. Using the faker library, I created this package to make a highly configurable markdown post generator. Additionally, it also provides an API for creating markdown files using python.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.


You must have python and pip installed on your system, and in you PATH. An activated virtual environment is also recommended.

Using pip:

pip install mdgen

Or using poetry:

poetry add mdgen

Sample usage

from faker import Faker
from mdgen import MarkdownPostProvider
fake = Faker()
fake_post ='medium') # available sizes: 'small', 'medium', 'large'

The output from the above command:

Drop question writer.

> After step respond support argue issue western movie.
[First memory suffer yard.](

        1. Possible career speak another believe realize analysis.
|First fear enter surface hospital nothing raise condition.|Name quickly deep free before if.|Rather church provide walk power thank student.|
|Box seem hotel picture popular politics century.|Side simple daughter central suggest.|Campaign nation Republican economy perform require.|


The documentation for this project can be found at

Running the tests

The project uses pytest to automate its test suite. To install all dependencies, ensure you have poetry installed on your system and then run:

poetry install

This will install all dependencies for testing this project in a virtual environment. Then run all tests using:

poetry shell

To see test coverage, run:

pytest --cov --cov-report=html --cache-clear

Then open htmlcov/index.html in your browser to see the test coverage.

Coding style

This project follows the pep8 specifications. The maximum line length has been increased to 90 characters. For the flake8 configuration used, see tox.ini. The test suite automatically runs the linters by default, but you can run just the linting tests.


Built With

  • Poetry - Dependency Management
  • Sphinx - Used to generate this project's documentation.


Please read for details on our code of conduct, and the process for submitting pull requests to us.


We use SemVer for versioning.


  • IgnisDa (Diptesh Choudhuri) - Initial work

See also the list of contributors who participated in this project. If you have made any contribution to this project, please add it in


This project is licensed under the Apache-2.0 License - see the file for details.


  • Hat tip to anyone whose code was used

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

mdgen-0.1.10.tar.gz (15.3 kB view hashes)

Uploaded Source

Built Distribution

mdgen-0.1.10-py3-none-any.whl (17.9 kB view hashes)

Uploaded Python 3

Supported by

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