{"id":17997435,"url":"https://github.com/scylladb/python-driver","last_synced_at":"2025-03-26T04:31:19.848Z","repository":{"id":34821781,"uuid":"158386117","full_name":"scylladb/python-driver","owner":"scylladb","description":"ScyllaDB Python Driver, originally DataStax Python Driver for Apache Cassandra","archived":false,"fork":true,"pushed_at":"2024-10-29T11:58:45.000Z","size":16589,"stargazers_count":73,"open_issues_count":65,"forks_count":42,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-10-29T13:32:49.316Z","etag":null,"topics":["python","scylladb"],"latest_commit_sha":null,"homepage":"https://python-driver.docs.scylladb.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"datastax/python-driver","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scylladb.png","metadata":{"files":{"readme":"README-dev.rst","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/security.rst","support":null}},"created_at":"2018-11-20T12:27:32.000Z","updated_at":"2024-10-29T11:53:46.000Z","dependencies_parsed_at":"2023-02-10T15:46:09.718Z","dependency_job_id":null,"html_url":"https://github.com/scylladb/python-driver","commit_stats":null,"previous_names":[],"tags_count":130,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scylladb%2Fpython-driver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scylladb%2Fpython-driver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scylladb%2Fpython-driver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scylladb%2Fpython-driver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scylladb","download_url":"https://codeload.github.com/scylladb/python-driver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245589261,"owners_count":20640253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","scylladb"],"created_at":"2024-10-29T21:18:28.028Z","updated_at":"2025-03-26T04:31:19.838Z","avatar_url":"https://github.com/scylladb.png","language":"Python","funding_links":[],"categories":["Drivers and Libraries"],"sub_categories":["Python"],"readme":"Releasing\n=========\n* Run the tests and ensure they all pass\n* Update the version in ``cassandra/__init__.py``\n* Add the new version in ``docs/conf.py`` (variables: ``TAGS``, ``LATEST_VERSION``, ``DEPRECATED_VERSIONS``).\n   * For patch version releases (like ``3.26.8-scylla -\u003e 3.26.9-scylla``) replace the old version with new one in ``TAGS`` and update ``LATEST_VERSION``.\n   * For minor version releases (like ``3.26.9-scylla -\u003e 3.27.0-scylla``) add new version to ``TAGS``, update ``LATEST_VERSION`` and add previous minor version to ``DEPRECATED_VERSIONS``.\n* Commit the version changes, e.g. ``git commit -m 'Release 3.26.9'``\n* Tag the release.  For example: ``git tag -a 3.26.9-scylla -m 'Release 3.26.9'``\n* Push the tag and new ``master`` SIMULTANEOUSLY: ``git push --atomic origin master v6.0.21-scylla``\n* Now new version and its docs should be automatically published. Check `PyPI \u003chttps://pypi.org/project/scylla-driver/#history\u003e`_ and `docs \u003chttps://python-driver.docs.scylladb.com/stable/\u003e`_ to make sure its there.\n* If you didn't push branch and tag simultaneously (or doc publishing failed for other reason) then restart the relevant job from GitHub Actions UI.\n* Publish a GitHub Release and a post on community forum.\n\nBuilding the Docs\n=================\n\nTo build and preview the documentation for the ScyllaDB Python driver locally, you must first manually install `python-driver`. \nThis is necessary for autogenerating the reference documentation of the driver.\nYou can find detailed instructions on how to install the driver in the `Installation guide \u003chttps://python-driver.docs.scylladb.com/stable/installation.html#manual-installation\u003e`_.\n\nAfter installing the driver, you can build the documentation:\n- Make sure you have Python version compatible with docs. You can see supported version in ``docs/pyproject.toml`` - look for ``python`` in ``tool.poetry.dependencies`` section.\n- Install poetry: ``pip install poetry``\n- To preview docs in your browser: ``make -C docs preview``\n\nTests\n=====\n\nRunning Unit Tests\n------------------\nUnit tests can be run like so::\n\n    python -m pytest tests/unit\n    EVENT_LOOP_MANAGER=gevent python -m pytest tests/unit/io/test_geventreactor.py\n    EVENT_LOOP_MANAGER=eventlet python -m pytest tests/unit/io/test_eventletreactor.py\n\nYou can run a specific test method like so::\n\n    python -m pytest tests/unit/test_connection.py::ConnectionTest::test_bad_protocol_version\n\nRunning Integration Tests\n-------------------------\nIn order to run integration tests, you must specify a version to run using either of:\n* ``SCYLLA_VERSION`` e.g. ``release:5.1``\n* ``CASSANDRA_VERSION``\nenvironment variable::\n\n    SCYLLA_VERSION=\"release:5.1\" python -m pytest tests/integration/standard tests/integration/cqlengine/\n\nOr you can specify a scylla/cassandra directory (to test unreleased versions)::\n\n    SCYLLA_VERSION=/path/to/scylla pytest tests/integration/standard/\n\nSpecifying the usage of an already running Scylla cluster\n------------------------------------------------------------\nThe test will start the appropriate Scylla clusters when necessary  but if you don't want this to happen because a Scylla cluster is already running the flag ``USE_CASS_EXTERNAL`` can be used, for example::\n\n    USE_CASS_EXTERNAL=1 SCYLLA_VERSION='release:5.1' pytest tests/integration/standard\n\nSpecify a Protocol Version for Tests\n------------------------------------\nThe protocol version defaults to:\n- 4 for Scylla \u003e= 3.0 and Scylla Enterprise \u003e 2019.\n- 3 for older versions of Scylla\n- 5 for Cassandra \u003e= 4.0, 4 for Cassandra \u003e= 2.2, 3 for Cassandra \u003e= 2.1, 2 for Cassandra \u003e= 2.0\nYou can overwrite it with the ``PROTOCOL_VERSION`` environment variable::\n\n    PROTOCOL_VERSION=3 SCYLLA_VERSION=\"release:5.1\" python -m pytest tests/integration/standard tests/integration/cqlengine/\n\nSeeing Test Logs in Real Time\n-----------------------------\nSometimes it's useful to output logs for the tests as they run::\n\n    python -m pytest -s tests/unit/\n\nUse tee to capture logs and see them on your terminal::\n\n    python -m pytest -s tests/unit/ 2\u003e\u00261 | tee test.log\n\n\nRunning the Benchmarks\n======================\nThere needs to be a version of cassandra running locally so before running the benchmarks, if ccm is installed:\n\t\n\tccm create benchmark_cluster -v 3.0.1 -n 1 -s\n\nTo run the benchmarks, pick one of the files under the ``benchmarks/`` dir and run it::\n\n    python benchmarks/future_batches.py\n\nThere are a few options.  Use ``--help`` to see them all::\n\n    python benchmarks/future_batches.py --help\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscylladb%2Fpython-driver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscylladb%2Fpython-driver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscylladb%2Fpython-driver/lists"}