diff --git a/README.rst b/README.md similarity index 97% rename from README.rst rename to README.md index fc774bf..7f17257 100644 --- a/README.rst +++ b/README.md @@ -1,52 +1,35 @@ -====== -pg8000 -====== +# pg8000 -.. |ssl.SSLContext| replace:: ``ssl.SSLContext`` -.. _ssl.SSLContext: https://docs.python.org/3/library/ssl.html#ssl.SSLContext - -.. |ssl.create_default_context()| replace:: ``ssl.create_default_context()`` -.. _ssl.create_default_context(): https://docs.python.org/3/library/ssl.html#ssl.create_default_context - -pg8000 is a pure-`Python `_ -`PostgreSQL `_ driver that complies with -`DB-API 2.0 `_. It is tested on Python -versions 3.8+, on CPython and PyPy, and PostgreSQL versions 12+. pg8000's name comes -from the belief that it is probably about the 8000th PostgreSQL interface for Python. -pg8000 is distributed under the BSD 3-clause license. +pg8000 is a pure-[Python](https://www.python.org/) +[PostgreSQL](http://www.postgresql.org/) driver that complies with +[DB-API 2.0](http://www.python.org/dev/peps/pep-0249/). It is tested on Python versions +3.8+, on CPython and PyPy, and PostgreSQL versions 12+. pg8000's name comes from the +belief that it is probably about the 8000th PostgreSQL interface for Python. pg8000 is +distributed under the BSD 3-clause license. All bug reports, feature requests and contributions are welcome at -`http://github.com/tlocke/pg8000/ `_. +[http://github.com/tlocke/pg8000/](http://github.com/tlocke/pg8000/). -.. image:: https://github.com/tlocke/pg8000/workflows/pg8000/badge.svg - :alt: Build Status +[![Workflow Status Badge](https://github.com/tlocke/pg8000/workflows/pg8000/badge.svg)](https://github.com/tlocke/pg8000/actions) -.. contents:: Table of Contents - :depth: 2 - :local: - -Installation ------------- +## Installation -To install pg8000 using `pip` type: +To install pg8000 using `pip` type: `pip install pg8000` -`pip install pg8000` - -Native API Interactive Examples -------------------------------- +## Native API Interactive Examples pg8000 comes with two APIs, the native pg8000 API and the DB-API 2.0 standard API. These are the examples for the native API, and the DB-API 2.0 examples follow in the next section. -Basic Example -````````````` +### Basic Example Import pg8000, connect to the database, create a table, add some rows and then query the table: +``` >>> import pg8000.native >>> >>> # Connect to the database with user name postgres @@ -70,6 +53,7 @@ query the table: [2, 'The Magus'] >>> >>> con.close() +``` Transactions diff --git a/pyproject.toml b/pyproject.toml index 09e4aab..03fbf83 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta" [project] name = "pg8000" description = "PostgreSQL interface library" -readme = "README.rst" +readme = "README.md" requires-python = ">=3.8" keywords= ["postgresql", "dbapi"] license = {text = "BSD 3-Clause License"}