Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

PyRopey

CI Build Status Latest Release Python version Documentation

Python bindings for Rust's Ropey library.

From Ropey's repository: Ropey is a utf8 text rope for Rust, designed to be the backing text-buffer for applications such as text editors. Ropey is fast, robust, and can handle huge texts and memory-incoherent edits with ease.

PyRopey aims to provide the performance and accessible interface of Rope into Python's world.

Installing

PyRopey is available in any platform and can be installed with pip:

pip install ropey

Note: PyRopey is currently is pre-release status and major changes are to be expected.

Example Usage

Adapted from Ropey's example.

from ropey import Rope

# Load a text file.
let text = Rope.from_file("my_great_book.txt")

# Print the 516th line (zero-indexed).
print(text.line(515))  # Not implemented yet

# Get the start/end char indices of the line.
let start_idx = text.line_to_char(515)  # Not implemented yet
let end_idx = text.line_to_char(516)

# Remove the line...
text.remove(slice(start_idx, end_idx))

# ...and replace it with something better.
text.insert(start_idx, "The flowers are... so... dunno.\n")

# Print the changes, along with the previous few lines for context.
let start_idx = text.line_to_char(511)
let end_idx = text.line_to_char(516)
print(text.slice(slice(start_idx, end_idx)))  # Not implemented yet

# Write the file back out to disk.
text.write_to_file("my_great_book.txt")

PyRopey's philosophy is to provide an API that is as close as possible to the original methods in Ropey. This is why we recommend using their documentation for more details.

Contributing

Contributions are more than welcome! Here are a few objectives:

  • Implement (almost) every methods from ropey::Rope
  • Write Python tests for every method
  • Write stubs for every method
  • Document every method
  • Create docs, hosted on ReadTheDocs
  • Build automated benchmarks to compared ropey with builtin alternatives

Metadata

Release files for ropey 0.0.2_alpha

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ropey 0.0.2_alpha
File Size Uploaded
ropey-0.0.2_alpha.tar.gz 8.9 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for ropey 0.0.2_alpha
File
ropey-0.0.2_alpha-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl PyPy 3.7 PyPy 3.7 7.3 Linux glibc 2.5+ x86-64 Details
ropey-0.0.2_alpha-cp310-none-win_amd64.whl CPython 3.10 none Windows x86-64 Details
ropey-0.0.2_alpha-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.5+ x86-64 Details
ropey-0.0.2_alpha-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl CPython 3.10 CPython 3.10 macOS 10.9+ x86-64, macOS 10.9+ universal2 (ARM64, x86-64), macOS 11.0+ ARM64 Details
ropey-0.0.2_alpha-cp39-none-win_amd64.whl CPython 3.9 none Windows x86-64 Details
ropey-0.0.2_alpha-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.5+ x86-64 Details
ropey-0.0.2_alpha-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl CPython 3.9 CPython 3.9 macOS 11.0+ ARM64, macOS 10.9+ x86-64, macOS 10.9+ universal2 (ARM64, x86-64) Details
ropey-0.0.2_alpha-cp38-none-win_amd64.whl CPython 3.8 none Windows x86-64 Details
ropey-0.0.2_alpha-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.5+ x86-64 Details
ropey-0.0.2_alpha-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl CPython 3.8 CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64), macOS 11.0+ ARM64, macOS 10.9+ x86-64 Details
ropey-0.0.2_alpha-cp37-none-win_amd64.whl CPython 3.7 none Windows x86-64 Details
ropey-0.0.2_alpha-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64 Details
ropey-0.0.2_alpha-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ x86-64, macOS 10.9+ universal2 (ARM64, x86-64), macOS 11.0+ ARM64 Details
ropey-0.0.2_alpha-cp36-none-win_amd64.whl CPython 3.6 none Windows x86-64 Details
ropey-0.0.2_alpha-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64 Details

Total release size: 9.5 MB

Release files / ropey-0.0.2_alpha.tar.gz

Download URL ropey-0.0.2_alpha.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a352fb23cfafb4d7af62ef34a6ed8e7cf854450dc0b9ac1a94e21d24d9cf5975
BLAKE2b-256 checksum
How to use checksums
c4ce368207e6caa24aa2215e2cca87c3ca9374913726e2bdf773b97c2e5c313e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.8

Release files / ropey-0.0.2_alpha-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl

Download URL ropey-0.0.2_alpha-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Size 1.0 MB
Tags Linux glibc 2.5+ x86-64 PyPy 3.7 PyPy 3.7 7.3
SHA-256 checksum
How to use checksums
263aa5f7090eb5ed0768344a5712b6399c07e0bd976e956bc780a5f7e87db462
BLAKE2b-256 checksum
How to use checksums
d777aab1a3a94407116ba63ea33dd5da0623a7acc57cee1f65870d48725b66b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.8

Release files / ropey-0.0.2_alpha-cp310-none-win_amd64.whl

Download URL ropey-0.0.2_alpha-cp310-none-win_amd64.whl
Size 192.2 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
c0b30cdc8eee9906e63e7c260a1966419d047f889fe48efb7b20c8be732b5d52
BLAKE2b-256 checksum
How to use checksums
944959ff419fb797f4cb062bcdf48f747d3829cc2869d362cbfc828cd3d77a02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.8

Release files / ropey-0.0.2_alpha-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl

Download URL ropey-0.0.2_alpha-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Size 1.0 MB
Tags CPython 3.10 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
96b3b83ba9f5f58578e16bb13f618ee8df76046616ebfacdecd57159c405b5a6
BLAKE2b-256 checksum
How to use checksums
010e62410723e6d25a877688ead9ab1f82783553e585e67d4829e08dcfe45148
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.8

Release files / ropey-0.0.2_alpha-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl

Download URL ropey-0.0.2_alpha-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Size 579.7 kB
Tags CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8ae9958d3efbf1539b0d09976f6fda690cac6765b32c7cc73b250cfd275a18fe
BLAKE2b-256 checksum
How to use checksums
2923106f05e2ff850a3ef3836897914a253c121712e2152aabca0e9dc196ca6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.8

Release files / ropey-0.0.2_alpha-cp39-none-win_amd64.whl

Download URL ropey-0.0.2_alpha-cp39-none-win_amd64.whl
Size 192.0 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
20c5e81a79c06cc0748843538d850a616e5bd041db63fcb84f9a7fd4bc117f94
BLAKE2b-256 checksum
How to use checksums
9fd270d13e757aa1a3daf12512666d2905aa3e2ba1b37f27be31a4e82d091a06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.8

Release files / ropey-0.0.2_alpha-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl

Download URL ropey-0.0.2_alpha-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Size 1.0 MB
Tags CPython 3.9 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
ba4cd5e4cbd7b7ea0b13bf107254b07c070f4c84ec6b9e5d190291c2d54fe30d
BLAKE2b-256 checksum
How to use checksums
b3da3dfa7f855aada917030ecaa20373b4398d07b96e140eb522373fbfa4e05c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.8

Release files / ropey-0.0.2_alpha-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl

Download URL ropey-0.0.2_alpha-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Size 579.6 kB
Tags CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
2f0966c84a61fb2cbfa43203c408a2aafa5afb9a0542c17d994a04a71deb3458
BLAKE2b-256 checksum
How to use checksums
ab477ba8a5ced952be478f3de93e959e8017ab849ec6500378a462efc261962e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.8

Release files / ropey-0.0.2_alpha-cp38-none-win_amd64.whl

Download URL ropey-0.0.2_alpha-cp38-none-win_amd64.whl
Size 192.3 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
f82b2dc9be600b2418cf32ab4758ea92affc89cf9e43d3007c8fa8d4033cfd69
BLAKE2b-256 checksum
How to use checksums
9b6bf7ae30fcc9acdebf9073c896fb934aed7986428058b992907f8579a59396
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.8

Release files / ropey-0.0.2_alpha-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl

Download URL ropey-0.0.2_alpha-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Size 1.0 MB
Tags CPython 3.8 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
e746ed05468d2939d53b16d4a03289de4f36d659dbfdf9f4a893c75d596258be
BLAKE2b-256 checksum
How to use checksums
c14224c7732ce78149a75f5da742a3ad98c654586ce04a9609d6d3940b659390
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.8

Release files / ropey-0.0.2_alpha-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl

Download URL ropey-0.0.2_alpha-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Size 579.5 kB
Tags CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
705952a12a2bd5bc0bdd91405e4d2e0983fcd1351f617c6c03d942a71f95f47f
BLAKE2b-256 checksum
How to use checksums
98af80f7e1069bb73130b230bd1657604cfcb880275a68e99b84ac3495bf26bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.8

Release files / ropey-0.0.2_alpha-cp37-none-win_amd64.whl

Download URL ropey-0.0.2_alpha-cp37-none-win_amd64.whl
Size 192.2 kB
Tags CPython 3.7 Windows x86-64
SHA-256 checksum
How to use checksums
920796021f73010bc3986db0d1a509378cbecf4d7ba79dd09b79d9dd5ae68c97
BLAKE2b-256 checksum
How to use checksums
43d45eaa66b6025ffb43b81f1314d05ed9359a38626f93444fabf6d2223626a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.8

Release files / ropey-0.0.2_alpha-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl

Download URL ropey-0.0.2_alpha-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Size 1.0 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
e7df9bf9c50a7746b08408be0bd51b3dc8bd78121b45487386f5b720ce42dd8e
BLAKE2b-256 checksum
How to use checksums
1d5e70615f149f4315c4dd092b89d7f4b9ada3b5660922befe233acf989ab7b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.8

Release files / ropey-0.0.2_alpha-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl

Download URL ropey-0.0.2_alpha-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Size 579.4 kB
Tags CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a3ff1ab2cf85e9e301f8100c90c0912d4e15dd14f4bb0dc770a6b523757fa2cb
BLAKE2b-256 checksum
How to use checksums
09be0a5dbd2c669b2d73b8a96da5f657db9a70912e8f4496fdca175d1354d7ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.8

Release files / ropey-0.0.2_alpha-cp36-none-win_amd64.whl

Download URL ropey-0.0.2_alpha-cp36-none-win_amd64.whl
Size 191.9 kB
Tags CPython 3.6 Windows x86-64
SHA-256 checksum
How to use checksums
b77e76d239dc18c0241411be5a7b5bf36cd6deaba09475eb6bfc686cd8595a13
BLAKE2b-256 checksum
How to use checksums
44f66bdcac67c9be9a49f14723d1b20d54e67785722be168158a79dde14ee72f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.8

Release files / ropey-0.0.2_alpha-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl

Download URL ropey-0.0.2_alpha-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Size 1.0 MB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
ed546adbef7e23b0631832d80c2c6cf2e2329b8f6e68427fceabf38206d1de90
BLAKE2b-256 checksum
How to use checksums
93774a59987aace8625786b644b672f7505a2f8a5c41c0c0e1f54ee9541fdac2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.8
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page