arcticdb.Arctic
- class arcticdb.Arctic(uri: str)[source]
Top-level library management class. Arctic instances can be configured against an S3 environment and enable the creation, deletion and retrieval of Arctic libraries.
- __init__(uri: str)[source]
Initializes a top-level Arctic library management instance.
For more information on how to use Arctic Library instances please see the documentation on Library.
- Parameters:
uri (str) –
URI specifying the backing store used to access, configure, and create Arctic libraries.
The S3 URI connection scheme has the form
s3(s)://<s3 end point>:<s3 bucket>[?options]
.Use s3s as the protocol if communicating with a secure endpoint.
Options is a query string that specifies connection specific options as
<name>=<value>
pairs joined with&
.Available options:
Option
Description
port
port to use for S3 connection
region
S3 region
use_virtual_addressing
Whether to use virtual addressing to access the S3 bucket
access
S3 access key
secret
S3 secret access key
path_prefix
Path within S3 bucket to use for data storage
aws_auth
If true, authentication to endpoint will be computed via AWS environment vars/config files. If no options are provided aws_auth will be assumed to be true.
Note: When connecting to AWS, region can be automatically deduced from the endpoint if the given endpoint specifies the region and region is not set.
The LMDB URI connection scheme has the form
lmdb:///<path to store LMDB files>
.
Examples
>>> ac = Arctic('s3://MY_ENDPOINT:MY_BUCKET') # Leave AWS to derive credential information >>> ac = Arctic('s3://MY_ENDPOINT:MY_BUCKET?region=YOUR_REGION&access=ABCD&secret=DCBA') # Manually specify creds >>> ac.create_library('travel_data') >>> ac.list_libraries() ['travel_data'] >>> travel_library = ac['travel_data'] >>> ac.delete_library('travel_data')
Methods
__init__
(uri)Initializes a top-level Arctic library management instance.
create_library
(name[, library_options])Creates the library named
name
.delete_library
(name)Removes the library called
name
.get_library
(library)Returns the library named library.
Lists all libraries available.