Skip to content

Commit

Permalink
Use Markdown for README
Browse files Browse the repository at this point in the history
  • Loading branch information
tlocke committed Mar 29, 2024
1 parent 165eb0b commit b8b1ab8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 32 deletions.
46 changes: 15 additions & 31 deletions README.rst → README.md
Original file line number Diff line number Diff line change
@@ -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 <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.
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/](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
Expand All @@ -70,6 +53,7 @@ query the table:
[2, 'The Magus']
>>>
>>> con.close()
```


Transactions
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Expand Down

0 comments on commit b8b1ab8

Please sign in to comment.