Skip to content

Commit

Permalink
update python snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
macjuul committed Dec 4, 2024
1 parent 3b315f3 commit 5915a32
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/screens/cloud-panel/modals/connect-sdk.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,13 @@ function ConnectSdkModal({ instance }: ConnectSdkModalProps) {
`,
py: `
# Open a connection
async with Surreal("wss://${instance.host}") as db:
async with Surreal(url="wss://${instance.host}") as db:
# Select a namespace and database
await db.use("${namespace}", "${database}")
# Authenticate
await db.signin({
"user": "${username}",
"pass": "${password}"
})
await db.sign_in(username="${username}", password="${password}")
`,
php: `
$db = new \\Surreal\\Surreal();
Expand Down

0 comments on commit 5915a32

Please sign in to comment.