tortoise / tortoise/tortoise-orm

Support for using multiple databases in the same app.

Open
#401 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation
Dominant language
Python
Stars
5.6k
Forks
516
Avg merge
2d 21h
Merged PRs (30d)
9

Description

I am using fastapi + tortoise orm. I have a postgres db with multiple databases inside it. I want to be able to use them. I can use one database by using the register_tortoise command, but am not able to figure out how to use more at the same application. I can see in the database config that it has a key called default under connections. So I was assuming that maybe there is a way that I don't know about. Thanks!

The database config example: here

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the FastAPI integration entry point, register_tortoise, and the database configuration example linked in the issue. Determine how multiple database connections should be configured and selected within one application. Done should include working support for more than one database and corresponding documentation or examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
fastapi, postgresql, python
Domain
backend, databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.