Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion lmfdb/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,22 @@ def get_database_info(show_hidden=False):
info[database].append((table, table[i+1:], coll.count()))
return info

@api_page.route("/options")
def options():
return render_template(
"database_options.html",
title="Access options for the LMFDB database",
learnmore=[("API", url_for(".index")),
("Table statistics", url_for(".stats")),
("lmfdb-lite", "https://www.github.com/roed314/lmfdb-lite"),
("Install the LMFDB locally", "https://github.com/LMFDB/lmfdb/blob/main/GettingStarted.md")],
bread=[("Access options", " ")],
)

@api_page.route("/")
def index(show_hidden=False):
databases = get_database_info(show_hidden)
title = "Database"
title = "API"
return render_template("api.html", **locals())

@api_page.route("/all")
Expand Down
54 changes: 54 additions & 0 deletions lmfdb/api/templates/database_options.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{% extends 'homepage.html' %}

{% block content %}

<div style="max-width:700px;">
<p>
There are three options available to access large amounts of data from the LMFDB.
</p>
</div>

<h3>Downloads from search result pages</h3>

<div style="max-width:700px;">
{{KNOWL_INC('intro.download_search')}}
</div>

<h3>The API</h3>

<div style="max-width:700px;">
{{KNOWL_INC('intro.api')}}
</div>

<h3>Direct SQL connection</h3>

<div style="max-width:700px;">
{{KNOWL_INC('intro.direct_sql')}}
</div>

<h3>SQL Mirror Access</h3>

<table class="ntdata">
<tr>
<th>host</th>
<td>devmirror.lmfdb.xyz</td>
</tr>
<tr>
<th>port</th>
<td>5432</td>
</tr>
<tr>
<th>dbname</th>
<td>lmfdb</td>
</tr>
<tr>
<th>user</th>
<td>lmfdb</td>
</tr>
<tr>
<th>password</th>
<td>lmfdb</td>
</tr>
</table>

{% endblock %}
2 changes: 1 addition & 1 deletion lmfdb/homepage/sidebar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
type: single
heading:
title: Database
url_for: "API.index"
url_for: "API.options"
type: knowl

...