-1

Are PEP-249 "rules" that Python database modules (eg psycopg) should follow?

Is PEP-249 not any Python code, class or something that can be "touchable", or something that is already (natively) inside Python itself?

Is PEP-249 a basis for the database modules that will be used by the Python language?

Mark Tolonen
  • 166,664
  • 26
  • 169
  • 251
  • 3
    "This API has been defined to **encourage similarity** between the Python modules that are used to access databases."—seems pretty clear – khelwood Oct 27 '20 at 18:43

1 Answers1

3

Taken from PEP-249 introduction:

This API has been defined to encourage similarity between the Python modules that are used to access databases. By doing this, we hope to achieve a consistency leading to more easily understood modules, code that is generally more portable across databases, and a broader reach of database connectivity from Python.

PEPs, i.e. Python Enhancement Proposals, are just that: proposals (see PEP-1). In this case, it's a proposal of a standard, "canonical" API design for database libraries. It isn't necessarily a "law of the land", but rather a reference for people who build such APIs.

The community has come together, decided that it might be a good idea to come up with something common, and put it up as a PEP. The PEP got accepted, and now it will be seen as a kind of a standard.

Whether or not this standard is followed is in the hands of the maintainers of each particular library. It's all a matter of agreement between developers.

Błażej Michalik
  • 4,474
  • 40
  • 55