Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: define module level docstrings #731

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/prisma/generator/templates/actions.py.jinja
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
"""
prisma.actions
~~~~~~~~~~~~~~

A module that lets you perform certain actions - creating, searching, updating
and deleting objects - to the database using a ``prisma.Client`` object.

:auto-generated:
"""

{% set annotations = true %}
{% include '_header.py.jinja' %}
{% from '_utils.py.jinja' import is_async, maybe_async_def, maybe_await, methods, operations, recursive_types, active_provider with context %}
Expand Down
10 changes: 10 additions & 0 deletions src/prisma/generator/templates/bases.py.jinja
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
"""
prisma.bases
~~~~~~~~~~~~

A module that defines all the base models to create complete models
based on the user defined schema.

:auto-generated:
"""

{% include '_header.py.jinja' %}
{% from '_utils.py.jinja' import recursive_types with context %}
# -- template models.py.jinja --
Expand Down
10 changes: 10 additions & 0 deletions src/prisma/generator/templates/client.py.jinja
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
"""
prisma.client
~~~~~~~~~~~~~

Main interface for the Client API - handles connecting, disconnecting
and querying the underlying Prisma Engine.

:auto-generated:
"""

{% set annotations = true %}
{% include '_header.py.jinja' %}
{% from '_utils.py.jinja' import is_async, maybe_async_def, maybe_await, methods, operations, recursive_types, active_provider with context %}
Expand Down
10 changes: 10 additions & 0 deletions src/prisma/generator/templates/enums.py.jinja
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
"""
prisma.enums
~~~~~~~~~~~~

Defines and make usable all the Enum models
defined by the user in the schema.

:auto-generated:
"""

{% include '_header.py.jinja' %}
# -- template enums.py.jinja --
from enum import Enum
Expand Down
20 changes: 20 additions & 0 deletions src/prisma/generator/templates/http.py.jinja
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
"""
prisma.http
~~~~~~~~~~~

Imports an async or sync HTTP client based on the user
defined interface in the schema.

For example this generator defined in the schema will generate
an async HTTP client.
```prisma
generator client {
provider = "prisma-client-py"
interface = "asyncio"
recursive_type_depth = -1
}
```

:auto-generated:
"""

{% include '_header.py.jinja' %}
# -- template http.py.jinja --
{% if generator.config.interface == 'asyncio' %}
Expand Down
10 changes: 10 additions & 0 deletions src/prisma/generator/templates/models.py.jinja
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
"""
prisma.models
~~~~~~~~~~~~~

A model that defines all the models defined by the user
in the schema making them usable.

:auto-generated:
"""

{% include '_header.py.jinja' %}
{% from '_utils.py.jinja' import recursive_types with context %}
# -- template models.py.jinja --
Expand Down
10 changes: 10 additions & 0 deletions src/prisma/generator/templates/types.py.jinja
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
"""
prisma.types
~~~~~~~~~~~~

Dinamically generated types based on models and on the user defined
schema.

:auto-generated:
"""

{% include '_header.py.jinja' %}
{% from '_utils.py.jinja' import recursive_types, active_provider with context %}
# -- template types.py.jinja --
Expand Down