Skip to content

Commit 1074366

Browse files
committed
rename server to backend
1 parent e43bcc0 commit 1074366

File tree

28 files changed

+47
-47
lines changed

28 files changed

+47
-47
lines changed

docs/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
from sanic import Sanic, response
66

77
from idom import component
8+
from idom.backend.sanic import Options, configure, use_request
89
from idom.core.types import ComponentConstructor
9-
from idom.server.sanic import Options, configure, use_request
1010

1111
from .examples import get_normalized_example_name, load_examples
1212

docs/source/guides/getting-started/_examples/run_fastapi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# :lines: 11-
22

33
from idom import run
4-
from idom.server import fastapi as fastapi_server
4+
from idom.backend import fastapi as fastapi_server
55

66

77
# the run() function is the entry point for examples
@@ -11,7 +11,7 @@
1111
from fastapi import FastAPI
1212

1313
from idom import component, html
14-
from idom.server.fastapi import configure
14+
from idom.backend.fastapi import configure
1515

1616

1717
@component

docs/source/guides/getting-started/_examples/run_flask.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# :lines: 11-
22

33
from idom import run
4-
from idom.server import flask as flask_server
4+
from idom.backend import flask as flask_server
55

66

77
# the run() function is the entry point for examples
@@ -11,7 +11,7 @@
1111
from flask import Flask
1212

1313
from idom import component, html
14-
from idom.server.flask import configure
14+
from idom.backend.flask import configure
1515

1616

1717
@component

docs/source/guides/getting-started/_examples/run_sanic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# :lines: 11-
22

33
from idom import run
4-
from idom.server import sanic as sanic_server
4+
from idom.backend import sanic as sanic_server
55

66

77
# the run() function is the entry point for examples
@@ -11,7 +11,7 @@
1111
from sanic import Sanic
1212

1313
from idom import component, html
14-
from idom.server.sanic import configure
14+
from idom.backend.sanic import configure
1515

1616

1717
@component

docs/source/guides/getting-started/_examples/run_starlette.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# :lines: 11-
22

33
from idom import run
4-
from idom.server import starlette as starlette_server
4+
from idom.backend import starlette as starlette_server
55

66

77
# the run() function is the entry point for examples
@@ -11,7 +11,7 @@
1111
from starlette.applications import Starlette
1212

1313
from idom import component, html
14-
from idom.server.starlette import configure
14+
from idom.backend.starlette import configure
1515

1616

1717
@component

docs/source/guides/getting-started/_examples/run_tornado.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# :lines: 11-
22

33
from idom import run
4-
from idom.server import tornado as tornado_server
4+
from idom.backend import tornado as tornado_server
55

66

77
# the run() function is the entry point for examples
@@ -12,7 +12,7 @@
1212
import tornado.web
1313

1414
from idom import component, html
15-
from idom.server.tornado import configure
15+
from idom.backend.tornado import configure
1616

1717

1818
@component

docs/source/guides/getting-started/_static/embed-idom-view/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from sanic.response import file
33

44
from idom import component, html
5-
from idom.server.sanic import Options, configure
5+
from idom.backend.sanic import Options, configure
66

77

88
app = Sanic("MyApp")

docs/source/guides/getting-started/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ Section 2: Running IDOM
106106

107107
Once you've :ref:`installed IDOM <Installing IDOM>`, you'll want to learn how to run an
108108
application. Throughout most of the examples in this documentation, you'll see the
109-
:func:`~idom.server.utils.run` function used. While it's convenient tool for development
110-
it shouldn't be used in production settings - it's slow, and could leak secrets through
111-
debug log messages.
109+
:func:`~idom.backend.utils.run` function used. While it's convenient tool for
110+
development it shouldn't be used in production settings - it's slow, and could leak
111+
secrets through debug log messages.
112112

113113
.. idom:: _examples/hello_world
114114

docs/source/guides/getting-started/running-idom.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Running IDOM
22
============
33

4-
The simplest way to run IDOM is with the :func:`~idom.server.utils.run` function. This
4+
The simplest way to run IDOM is with the :func:`~idom.backend.utils.run` function. This
55
is the method you'll see used throughout this documentation. However, this executes your
66
application using a development server which is great for testing, but probably not what
77
if you're :ref:`deploying in production <Running IDOM in Production>`. Below are some
@@ -20,10 +20,10 @@ will follow a pattern similar to the following:
2020

2121
.. code-block::
2222
23-
from my_chosen_server import Application
23+
from my_chosen_backend import Application
2424
2525
from idom import component, html
26-
from idom.server.my_chosen_server import configure
26+
from idom.backend.my_chosen_backend import configure
2727
2828
2929
@component
@@ -151,17 +151,17 @@ respective ``configure()`` functions in the following way:
151151

152152
.. code-block::
153153
154-
from idom.server.<implementation> import configure, Options
154+
from idom.backend.<implementation> import configure, Options
155155
156156
configure(app, MyComponent, Options(...))
157157
158-
To learn more read about the options for your chosen server ``<implementation>``:
158+
To learn more read about the options for your chosen backend ``<implementation>``:
159159

160-
- :class:`idom.server.fastapi.Options`
161-
- :class:`idom.server.flask.Options`
162-
- :class:`idom.server.sanic.Options`
163-
- :class:`idom.server.starlette.Options`
164-
- :class:`idom.server.tornado.Options`
160+
- :class:`idom.backend.fastapi.Options`
161+
- :class:`idom.backend.flask.Options`
162+
- :class:`idom.backend.sanic.Options`
163+
- :class:`idom.backend.starlette.Options`
164+
- :class:`idom.backend.tornado.Options`
165165

166166

167167
Embed in an Existing Webpage

scripts/live_docs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
)
1515

1616
from docs.app import IDOM_MODEL_SERVER_URL_PREFIX, Example, make_app, reload_examples
17-
from idom.server.sanic import Options, configure, serve_development_app
17+
from idom.backend.sanic import Options, configure, serve_development_app
1818
from idom.testing import clear_idom_web_modules_dir
1919

2020

0 commit comments

Comments
 (0)