官术网_书友最值得收藏!

Project overview

In this chapter, we'll look at how to build a program that loads a JSON file and an XML file into three databases: a SQLite database, a PostgreSQL database, and a Redis key-value store. To avoid hardwiring the names and positions of the files and the database credentials into the program, we are going to load them from a TOML configuration file.

The final project is named transformer, but we'll explain this through several preliminary small projects:

  • toml_dynamic and toml_static: These read a TOML file in two different ways.
  • json_dynamic and json_static: These read a JSON file in two different ways.
  • xml_example: This reads an XML file.
  • sqlite_example: This creates two tables in a SQLite database, inserts records into them, and queries them.
  • postgresql_example: This creates two tables in a PostgreSQL database, inserts records into them, and queries them.
  • redis_example: This adds some data to a key-value store and queries it.
主站蜘蛛池模板: 深州市| 三门峡市| 盱眙县| 霍州市| 上饶县| 敖汉旗| 永丰县| 博罗县| 赣榆县| 梅河口市| 建瓯市| 满洲里市| 富裕县| 襄樊市| 上杭县| 通化市| 都江堰市| 达州市| 胶州市| 彭水| 宕昌县| 大余县| 汝州市| 塔河县| 积石山| 肇东市| 宣化县| 靖西县| 民丰县| 若尔盖县| 泰和县| 绍兴市| 宜章县| 葫芦岛市| 临猗县| 晋江市| 馆陶县| 德昌县| 攀枝花市| 什邡市| 山阳县|