-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from ecmwf/feature/direct_config
Add config and user_config options to pyfdb
- Loading branch information
Showing
7 changed files
with
301 additions
and
27 deletions.
There are no files selected for viewing
This file contains 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 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 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 |
---|---|---|
@@ -1 +1,39 @@ | ||
"""PyFDB is python client to the FDB5 library. It provides list, retrieve, | ||
and archive functions to interact with FDB5 databases. | ||
See the docstrings of pyfdb.list, pyfdb.archive, pyfdb.retrieve for more information. | ||
Example: | ||
import pyfdb | ||
fdb = pyfdb.FDB() | ||
fdb.archive(open('x138-300.grib', "rb").read(), key) | ||
fdb.flush() | ||
for entry in fdb.list(request = {...}, duplicates=False, keys=False): | ||
print(entry) | ||
Locating the FDB5 library: | ||
PyFDB uses findlibs to locate the fdb5 shared library. findlibs will attempt to | ||
locate the FDB5 library by looking in the following locations: | ||
* sys.prefix | ||
* $CONDA_PREFIX | ||
* $FDB5_HOME or $FDB5_DIR | ||
* $LD_LIBRARY_PATH and $DYLD_LIBRARY_PATH | ||
* "/", "/usr/", "/usr/local/", "/opt/", and "/opt/homebrew/". | ||
You can set "$FDB5_HOME" or load a conda environment to direct pyFDB to a particular FDB5 library. | ||
You can check which library is being used by printing `pyfdb.lib` | ||
$ print(pyfdb.lib) | ||
<pyfdb.pyfdb.PatchedLib FDB5 version 5.12.1 from /path/to/lib/libfdb5.dylib> | ||
See https://github.com/ecmwf/findlibs for more info on library resolution. | ||
See https://github.com/ecmwf/pyfdb for more information on pyfdb. | ||
""" | ||
|
||
from .pyfdb import * |
This file contains 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 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.