Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
.. image:: https://github.com/edgedb/edgedb-python/workflows/Tests/badge.svg?event=push&branch=master :target: https://github.com/edgedb/edgedb-python/actions
.. image:: https://img.shields.io/pypi/v/edgedb.svg :target: https://pypi.python.org/pypi/edgedb
.. image:: https://img.shields.io/badge/join-github%20discussions-green :target: https://github.com/edgedb/edgedb/discussions
edgedb-python is the official EdgeDB driver for Python. It provides both blocking IO and asyncio implementations.
The library requires Python 3.8 or later.
The project documentation can be found
here <https://edgedb.com/docs/clients/00_python/index>
_.
The library is available on PyPI. Use pip
to install it::
$ pip install edgedb
.. code-block:: python
import datetime
import edgedb
def main():
client = edgedb.create_client()
# Create a User object type
client.execute('''
CREATE TYPE User {
CREATE REQUIRED PROPERTY name -> str;
CREATE PROPERTY dob -> cal::local_date;
}
''')
# Insert a new User object
client.query('''
INSERT User {
name := <str>$name,
dob := <cal::local_date>$dob
}
''', name='Bob', dob=datetime.date(1984, 3, 1))
# Select User objects.
user_set = client.query(
'SELECT User {name, dob} FILTER .name = <str>$name', name='Bob')
# *user_set* now contains
# Set{Object{name := 'Bob', dob := datetime.date(1984, 3, 1)}}
# Close the client.
client.close()
if __name__ == '__main__':
main()
Instructions for installing EdgeDB and edgedb-python locally can be found at
edgedb.com/docs/reference/dev <https://edgedb.com/docs/reference/dev>
_.
To run the test suite, run $ python setup.py test
.
edgedb-python is developed and distributed under the Apache 2.0 license.
FAQs
EdgeDB Python driver
We found that edgedb demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.