Manages an API Server running as a seperate process.
def google.appengine.tools.api_server.APIServerProcess.__init__ |
( |
|
self, |
|
|
|
executable, |
|
|
|
host, |
|
|
|
port, |
|
|
|
app_id, |
|
|
|
script = None , |
|
|
|
appidentity_email_address = None , |
|
|
|
appidentity_private_key_path = None , |
|
|
|
application_host = None , |
|
|
|
application_port = None , |
|
|
|
application_root = None , |
|
|
|
auto_id_policy = None , |
|
|
|
blobstore_path = None , |
|
|
|
clear_datastore = None , |
|
|
|
clear_prospective_search = None , |
|
|
|
datastore_path = None , |
|
|
|
enable_sendmail = None , |
|
|
|
enable_task_running = None , |
|
|
|
high_replication = None , |
|
|
|
logs_path = None , |
|
|
|
prospective_search_path = None , |
|
|
|
require_indexes = None , |
|
|
|
show_mail_body = None , |
|
|
|
smtp_host = None , |
|
|
|
smtp_password = None , |
|
|
|
smtp_port = None , |
|
|
|
smtp_user = None , |
|
|
|
smtp_allow_tls = None , |
|
|
|
task_retry_seconds = None , |
|
|
|
trusted = None , |
|
|
|
use_sqlite = None , |
|
|
|
default_gcs_bucket_name = None |
|
) |
| |
Configures the APIs hosted by this server.
Args:
executable: The path of the executable to use when running the API Server
e.g. "/usr/bin/python".
host: The host name that should be used by the API Server e.g.
"localhost".
port: The port number that should be used by the API Server e.g. 8080.
app_id: The str application id e.g. "guestbook".
script: The name of the script that should be used, along with the
executable argument, to run the API Server e.g. "api_server.py".
If None then the executable is run without a script argument.
appidentity_email_address: Email address for service account substitute.
appidentity_private_key_path: Private key for service account substitute.
application_host: The name of the host where the development application
server is running e.g. "localhost".
application_port: The port where the application server is running e.g.
8000.
application_root: The path to the directory containing the user's
application e.g. "/home/bquinlan/myapp".
auto_id_policy: One of "sequential" or "scattered", indicating whether
the Datastore stub should assign IDs sequentially or scattered.
blobstore_path: The path to the file that should be used for blobstore
storage.
clear_datastore: Clears the file at datastore_path, emptying the
datastore from previous runs.
clear_prospective_search: Clears the file at prospective_search_path,
emptying the perspective search state from previous runs.
datastore_path: The path to the file that should be used for datastore
storage.
enable_sendmail: A bool indicating if sendmail should be used when sending
e-mails. This argument is ignored if mail_smtp_host is not None.
enable_task_running: A bool indicating whether taskqueue tasks should
be run automatically or it the must be manually triggered.
high_replication: A bool indicating whether to use the high replication
consistency model.
logs_path: Path to the file to store the logs data in.
prospective_search_path: The path to the file that should be used to
save prospective search subscriptions.
require_indexes: A bool indicating if the same production
datastore indexes requirements should be enforced i.e. if True then
a google.appengine.ext.db.NeedIndexError will be be raised if a query
is executed without the required indexes.
show_mail_body: A bool indicating whether the body of sent e-mails
should be written to the logs.
smtp_host: The SMTP hostname that should be used when sending e-mails.
If None then the enable_sendmail argument is considered.
smtp_password: The password to use when authenticating with the
SMTP server. This value may be None if smtp_host or smtp_user
is also None.
smtp_port: The SMTP port number that should be used when sending
e-mails. If this value is None then smtp_host must also be None.
smtp_user: The username to use when authenticating with the
SMTP server. This value may be None if smtp_host is also None or if
the SMTP server does not require authentication.
smtp_allow_tls: A bool indicating whether to enable TLS.
task_retry_seconds: An int representing the number of seconds to
wait before a retrying a failed taskqueue task.
trusted: A bool indicating if privileged APIs should be made available.
use_sqlite: A bool indicating whether DatastoreSqliteStub or
DatastoreFileStub should be used.
default_gcs_bucket_name: A str overriding the normal default bucket name.
def google.appengine.tools.api_server.APIServerProcess.Quit |
( |
|
self, |
|
|
|
timeout = 5.0 |
|
) |
| |
Causes the API Server process to exit.
Args:
timeout: The maximum number of seconds to wait for an orderly shutdown
before forceably killing the process.
def google.appengine.tools.api_server.APIServerProcess.Start |
( |
|
self | ) |
|
Starts the API Server process.
def google.appengine.tools.api_server.APIServerProcess.url |
( |
|
self | ) |
|
Returns the URL that should be used to communicate with the server.
def google.appengine.tools.api_server.APIServerProcess.WaitUntilServing |
( |
|
self, |
|
|
|
timeout = 30.0 |
|
) |
| |
Waits until the API Server is ready to handle requests.
Args:
timeout: The maximum number of seconds to wait for the server to be ready.
Raises:
Error: if the server process exits or is not ready in "timeout" seconds.
The documentation for this class was generated from the following file:
- code/googleappengine-read-only/python/google/appengine/tools/api_server.py