semvec/pypi-packages huggingface dataset:
django-test-books 0.0.1
A Django app to conduct web-based polls.
License: MIT
Requires Python: >=3.8

=====
Books
=====

books is a Django app to conduct web-based books. For each question,
visitors can choose between a fixed number of answers.

Detailed documentation is in the "docs" directory.

Quick start
-----------

1. Add "books" to your INSTALLED_APPS setting like this::

    INSTALLED_APPS = [
        ...
        'books',
    ]

2. Include the books URLconf in your project urls.py like this::

    path('books/', include('books.urls')),

3. Run ``python manage.py migrate`` to create the books models.

4. Start the development server and visit http://127.0.0.1:8000/admin/
   to create a poll (you'll need the Admin app enabled).

5. Visit http://127.0.0.1:8000/books/ to participate in the poll.
flake8-newspaper-style 0.4.3
Check code for newspaper style
License: MIT

# Enforce Newspaper Style with Flake

## Motivation

Good code reads like a newspaper. Start with the highest abstraction, go to the details.
This also enables to read the code without an editor.

Quoting Robert C. Martin from his Clean Code book.

“Think of a well-written newspaper article. You read it vertically. At the top you expect a headline that will tell you what the story is about and allows you to decide whether it is something you want to read. The first paragraph gives you a synopsis of the whole story, hiding all the details while giving you the broad-brush concepts. As you continue downward, the details increase until you have all the dates, names, quotes, claims, and other minutia.”

In Python newspaper code should look like this.

```py
def headline():
    text()

def text():  # this needs to be defined after the usage.
    ...
```

There hasn't been an automatic way in python to check for this. So here it is.

## Usage

```py
# install the flake8 extension for newspaper style
pip3 install flake8-newspaper-style==0.4.2
# then check your code
flake8 --select=NEW src  # here it restricts flake8 to newspaper style issues
```

## References

 - Clean Code book by Robert C. Martin
 - [Clean Code formatting matters](https://www.codingblocks.net/podcast/clean-code-formatting-matters/)