Spaces:
Sleeping
Sleeping
Download docs/auth.html from sammmmmmm25/marine-tracker: direct link, hf CLI and curl.
- Browser
- Download file 3.32 kB
-
https://huggingface.co/spaces/sammmmmmm25/marine-tracker/resolve/main/docs/auth.html
- Command line
-
hf download hf://spaces/sammmmmmm25/marine-tracker/docs/auth.html
-
curl -L -o auth.html https://huggingface.co/spaces/sammmmmmm25/marine-tracker/resolve/main/docs/auth.html
3.32 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Python: module auth</title> | |
| </head><body> | |
| <table class="heading"> | |
| <tr class="heading-text decor"> | |
| <td class="title"> <br><strong class="title">auth</strong></td> | |
| <td class="extra"><a href=".">index</a><br><a href="file:/Users/samuelveliveli/Downloads/marine-tracker/src/auth.py">/Users/samuelveliveli/Downloads/marine-tracker/src/auth.py</a></td></tr></table> | |
| <p><span class="code">Optional Movebank credentials, loaded from environment variables.<br> | |
| <br> | |
| Movebank's live tracking API (www.movebank.org/movebank/service/direct-read)<br> | |
| requires HTTP Basic Auth on every request, including study discovery -- there<br> | |
| is no anonymous tier. If MOVEBANK_USERNAME and MOVEBANK_PASSWORD are not set,<br> | |
| callers should fall back to the Movebank Data Repository (a separate, fully<br> | |
| public, DOI-archival system used by ingest.py for historical studies).<br> | |
| <br> | |
| Credentials are read from a local .env file (via python-dotenv) or from the<br> | |
| shell environment. Never hardcode credentials in source.</span></p> | |
| <p> | |
| <table class="section"> | |
| <tr class="decor pkg-content-decor heading-text"> | |
| <td class="section-title" colspan=3> <br><strong class="bigsection">Modules</strong></td></tr> | |
| <tr><td class="decor pkg-content-decor"><span class="code"> </span></td><td> </td> | |
| <td class="singlecolumn"><table><tr><td class="multicolumn"><a href="os.html">os</a><br> | |
| </td><td class="multicolumn"></td><td class="multicolumn"></td><td class="multicolumn"></td></tr></table></td></tr></table><p> | |
| <table class="section"> | |
| <tr class="decor functions-decor heading-text"> | |
| <td class="section-title" colspan=3> <br><strong class="bigsection">Functions</strong></td></tr> | |
| <tr><td class="decor functions-decor"><span class="code"> </span></td><td> </td> | |
| <td class="singlecolumn"><dl><dt><a name="-get_auth"><strong>get_auth</strong></a>()</dt><dd><span class="code">Return a (username, password) tuple suitable for requests' `auth=` kwarg, or None.<br> | |
| <br> | |
| Returns None when no credentials are configured, signaling callers to use<br> | |
| the public Data Repository fallback instead of the live API.</span></dd></dl> | |
| <dl><dt><a name="-get_credentials"><strong>get_credentials</strong></a>()</dt><dd><span class="code">Return (username, password) from the environment, or (None, None) if unset.</span></dd></dl> | |
| <dl><dt><a name="-has_live_credentials"><strong>has_live_credentials</strong></a>()</dt><dd><span class="code">Return True if both MOVEBANK_USERNAME and MOVEBANK_PASSWORD are set and non-empty.</span></dd></dl> | |
| </td></tr></table> | |
| </body></html> |