Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7872213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:08:27+00:00 2026-06-03T02:08:27+00:00

I have an application I am building using wxpython with postgresql as my database.

  • 0

I have an application I am building using wxpython with postgresql as my database. I don’t know what is the right approach to send the data from GUI to the database but what I am doing is storing the GUI(txtctrl) output in dictionary and trying to send it to postgresql. My question is: Is there any way to send the data to the database using sqlalchemy where dictionary keys acts as the column_fields and dictionary-values as its values.Is there more elegant way to do the data-communication between GUI and database?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T02:08:28+00:00Added an answer on June 3, 2026 at 2:08 am

    Supposing you are using declaratives in sqlalchemy, and your object name is Object, you can use:

    # I suppose you already have your session somehow...
    # If you want to add it to the database
    # Assuming you did not change the __init__ method
    obj = Object(**data_dictionary_with_keys_matching_column_names)
    session.add(obj)
    
    # If you want to issue an update
    # obj is already there somehow...
    for k, v in data_dictionary_with_keys_matching_column_names.iterkeys():
        setattr(obj, k, v)
    
    session.commit()
    

    That’s only if you are using the ORM and declarative. (You mentioned sqlalchemy, so I guess it does not change if it’s postgresql or another one)

    EDIT: I think you are going for the right approach, just make sure you use wx.Validators for your forms and store in a dictionary the data, it’s very practical.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building WP7 application using DropNet. I have successfully managed to log in and
In have my application configured in asp.net. I am using ajaxcontroltoolkit. After building the
I am building a web application and have been told that using object oriented
Helo. I am building an application for kids using Phonegap. On Android I have
I have been building a new application using my current understanding of domain driven
I'm building a web application using PHP5.3 and Zend Framework 1.9.4. i have an
I have a web application that I am building using IDEA. There are some
I have a web-application on RAD 7.5. I am building the application using Maven
I am building an application using Raphaël. I have done my work on vectors,
I have application building using third party apis, j2me apis,application code distributed in various

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.