Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mekadb

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mekadb

Hypi MekaDB database client

  • 0.1.0
  • PyPI
  • Socket score

Maintainers
1

Hypi's MekaDB client

Register a https://hypi.ai/mekadb

Usage

if __name__ == '__main__':
    async def main():
        # Create an instance of the MekaDBClient
        client = MekaDBClient()
        # Connect to Hypi and keep a connection in the background
        await client.run()
        # Login to get authentication context
        auth = await client.login('<username>', '<password>', '<database name>')
        res = await client.query(creds=auth,
                                 sql='CREATE TABLE IF NOT EXISTS user(username VARCHAR, pass VARCHAR, PRIMARY KEY (username))')
        print("Create table:", res)
        res = await client.query(creds=auth,
                                 sql="INSERT INTO user(username,pass) VALUES('courtney','pass1'),('damion','pass2')")
        print("Insert:", res)
        res = await client.query(creds=auth, sql='SELECT * FROM user WHERE pass = :pass', params={'pass': 'pass99'})
        print("Select:", res)

        # Close the connection
        await client.close()


    # Run the main function within an asyncio event loop
    asyncio.run(main())

FAQs


Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc