-
Notifications
You must be signed in to change notification settings - Fork 12
chore: docs updated #391
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
Merged
Merged
chore: docs updated #391
Changes from 6 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
3e0eef4
chore: docs updated
raven-wing 36b81d2
added misssing files
raven-wing 11b4dab
removed extra file
raven-wing 691d02d
shorten docs
raven-wing 8bdc010
docs: catch up with the photo-attachment changes from next
raven-wing dbdbcc3
docs: bring back the generated API reference
raven-wing de83bdc
docs: plugins live in the data source, not in config.yml
raven-wing 0b110d7
docs: address review feedback on PR #391
raven-wing ab4c882
fixes
raven-wing 07289fc
removed some lines
raven-wing 5cc7064
fixes
raven-wing 8773acd
simplification
raven-wing 2b85907
fix it
raven-wing 1417837
simplify
raven-wing 3831b2c
cleanup
raven-wing c7f0712
some explaining
raven-wing 026d837
cleaned up some comments
raven-wing d658e79
fix
raven-wing 21c7933
name fixes
raven-wing f8c993b
cleanup
raven-wing 3cea7ab
simplify
raven-wing 636d918
its all about bridges
raven-wing File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,121 @@ | ||
| Python API reference | ||
| ==================== | ||
|
|
||
| Generated from the source. This is the reference for code you *import* — writing a | ||
| plugin, embedding the app, or working on Goodmap itself. If you are calling Goodmap over | ||
| HTTP instead, you want :doc:`http-api`; if you are configuring an instance, you want | ||
| :doc:`configuration`. | ||
|
|
||
| Nothing here is a substitute for the task pages: use those to find out *which* thing to | ||
| reach for, and this page for its exact signature. | ||
|
|
||
| .. note:: | ||
|
|
||
| Only the ``goodmap`` package is covered. Everything a Goodmap deployment inherits from | ||
| platzky — the engine, blog, plugin loader — is documented in | ||
| :doc:`platzky's own reference <platzky:index>`. | ||
|
|
||
| Creating the application | ||
| ------------------------ | ||
|
|
||
| The documented way to build an app is the factory, given a path to ``config.yml``. It is | ||
| what ``flask --app`` and ``gunicorn`` take as their target string (:doc:`deployment`). | ||
|
|
||
| .. autofunction:: goodmap.goodmap.create_app | ||
|
|
||
| .. autoclass:: goodmap.config.GoodmapConfig | ||
| :members: | ||
| :show-inheritance: | ||
|
|
||
| ``GoodmapConfig`` is a platzky ``Config`` with Goodmap's extra keys, and it is what | ||
| ``create_app`` parses the YAML into. The prose description of every key is in | ||
| :doc:`configuration`. | ||
|
|
||
| Plugins | ||
| ------- | ||
|
|
||
| The capability base classes a plugin subclasses. Which capability does what, and how a | ||
| plugin is packaged and activated, is covered in :doc:`plugins`. | ||
|
|
||
| .. automodule:: goodmap.plugin | ||
| :members: | ||
| :show-inheritance: | ||
|
|
||
| Location data | ||
| ------------- | ||
|
|
||
| The models every point is validated against — both points already in the data source and | ||
| points arriving through ``/api/suggest-new-point``. ``create_location_model`` is the one | ||
| to know: it builds a model from your data source's ``location_obligatory_fields`` and | ||
| ``categories`` at startup, which is why those keys are validation rules and not just | ||
| documentation (:doc:`data-source`). | ||
|
|
||
| .. automodule:: goodmap.data_models.location | ||
| :members: | ||
| :show-inheritance: | ||
|
|
||
| Request and response models | ||
| --------------------------- | ||
|
|
||
| Pydantic models for the HTTP layer. These are what generate the OpenAPI document served | ||
| at ``/api/doc/openapi.json``, so they and the schema endpoint never disagree. | ||
|
|
||
| .. automodule:: goodmap.api_models | ||
| :members: | ||
| :show-inheritance: | ||
|
|
||
| Data access | ||
| ----------- | ||
|
|
||
| The data-source layer: one implementation per ``DB.TYPE``, plus the query functions the | ||
| API blueprint calls. Backend trade-offs and the MongoDB layout are in | ||
| :ref:`data-source-backends`. | ||
|
|
||
| .. automodule:: goodmap.db | ||
| :members: | ||
| :show-inheritance: | ||
|
|
||
| Querying, filtering and clustering | ||
| ---------------------------------- | ||
|
|
||
| How a request's query parameters become a list of points: filter combination, distance | ||
| sorting and limiting, then optional server-side clustering. | ||
|
|
||
| .. automodule:: goodmap.core | ||
| :members: | ||
|
|
||
| .. automodule:: goodmap.filtering | ||
| :members: | ||
|
|
||
| .. automodule:: goodmap.clustering | ||
| :members: | ||
|
|
||
| Formatting | ||
| ---------- | ||
|
|
||
| Translation of category keys, option values and field names on the way out | ||
| (:ref:`config-translations`). | ||
|
|
||
| .. automodule:: goodmap.formatter | ||
| :members: | ||
|
|
||
| Errors | ||
| ------ | ||
|
|
||
| Exceptions raised by the data layer, and the helpers that turn them into the deliberately | ||
| generic ``{"message": "..."}`` responses described in :doc:`http-api`. | ||
|
|
||
| .. automodule:: goodmap.exceptions | ||
| :members: | ||
| :show-inheritance: | ||
|
|
||
| Input hardening | ||
| --------------- | ||
|
|
||
| Limits applied to JSON arriving from the network before it is parsed into a point. The | ||
| concrete numbers, and the response you get for exceeding them, are in | ||
| :doc:`http-api`. | ||
|
|
||
| .. automodule:: goodmap.json_security | ||
| :members: | ||
| :show-inheritance: |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.