aeca python
1.0.0
AECA 데이터베이스 서버 용 Python 클라이언트.
$ pip install aeca현재 버전은 생산 환경에서 완벽하게 작동하고 안정적입니다. 그러나 API는 여전히 변경 될 수 있으며 다음 릴리스에서 뒤로 호환 될 수 있습니다.
import aeca
# Establish connection to a local database server.
channel = aeca . Channel ( "localhost" , 10080 )
# List collections.
db = aeca . DocumentDB ( channel )
collections = db . list_collections ()
for collection in collections :
print ( collection )
# Find a specific document in the Wikipedia collection.
collection = aeca . find_collection ( "Wikipedia" )
df = collection . find ({
"page_id" : 42
}, to_pandas = True )
print ( df ) import aeca
# Establish connection to a local database server.
channel = aeca . Channel ( "localhost" , 10080 )
# Login to the database.
ws = aeca . Workspaces ( channel , "user_id" , "password" )
# List workspaces.
workspaces = ws . list_workspaces ()
for workspace in workspaces :
print ( workspace )
# Open the workspace and list the collections.
workspace = ws . find_workspace ( "test" )
db = aeca . DocumentDB ( workspace )
collections = db . list_collections ()
for collection in collections :
print ( collection )
# Find a specific document in the Wikipedia collection.
collection = aeca . find_collection ( "Wikipedia" )
df = collection . find ({
"page_id" : 42
}, to_pandas = True )
print ( df )