
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
This package is a MonkDB's Python SDK client library. It is compliant with PEP0249 to interact with database engines using Python's established goto practices.
One can use the regular pip
to install monkdb client driver. It installs the latest package.
pip install monkdb
Or if you want to install a specific version using pip
, please run the below command.
pip install monkdb==1.0.5
One can also use other python package managers. For example, below is the command to install with poetry
. It installs the latest package
poetry add monkdb
Or if you want to add specific version of MonkDB using poetry
, please run the below command.
poetry add monkdb@1.0.0
The first step in working with MonkDB is to establish a connection using the client instance. This is a prerequisite for performing downstream operations such as executing SQL statements, interacting with tables, and more.
from monkdb import client
try:
connection = client.connect(
f"http://{DB_USER}:{DB_PASSWORD}@{DB_HOST}:{DB_PORT}", username=DB_USER
)
cursor = connection.cursor()
print("✅ Database connection established successfully!")
except Exception as e:
print(f"⚠️ Error connecting to the database: {e}")
exit(1)
Use the cursor
that is connected to MonkDB in the previous step to execute SQL statements, close the connection, and perform other database operations.
In the example below, we are dropping the table if it exists:
# Drop table if exists
cursor.execute(f"DROP TABLE IF EXISTS {DB_SCHEMA}.{TABLE_NAME}")
print(f"Dropped {DB_SCHEMA}.{TABLE_NAME} table")
If the connection is not needed anymore, please close the connection to MonkDB.
# Close connection
cursor.close()
connection.close()
For enterprise support, please write to us at devs@monkdb.com.
FAQs
MonkDB Python Client to interact with MonkDB's database engine
We found that monkdb demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.