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 in 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.4_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.4_alpha
File Size Uploaded
ropey-0.0.4_alpha.tar.gz 815.8 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for ropey 0.0.4_alpha
File
ropey-0.0.4_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.4_alpha-cp310-none-win_amd64.whl CPython 3.10 none Windows x86-64 Details
ropey-0.0.4_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.4_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.4_alpha-cp39-none-win_amd64.whl CPython 3.9 none Windows x86-64 Details
ropey-0.0.4_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.4_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.4_alpha-cp38-none-win_amd64.whl CPython 3.8 none Windows x86-64 Details
ropey-0.0.4_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.4_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.4_alpha-cp37-none-win_amd64.whl CPython 3.7 none Windows x86-64 Details
ropey-0.0.4_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.4_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.4_alpha-cp36-none-win_amd64.whl CPython 3.6 none Windows x86-64 Details
ropey-0.0.4_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: 10.4 MB

Release files / ropey-0.0.4_alpha.tar.gz

Download URL ropey-0.0.4_alpha.tar.gz
Size 815.8 kB
Tags Source
SHA-256 checksum
How to use checksums
a3af13e6ab006149de448d49c04c70f83df426174e8474c08277a3e552ca4a46
BLAKE2b-256 checksum
How to use checksums
b683995b872f625b797ba62ad49dbbdcc11014209a413dedac75b22682a361d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.9

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

Download URL ropey-0.0.4_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
10892e577755afb51320a146802266e1f69a20a57b6352606fe0a0536ddae6ba
BLAKE2b-256 checksum
How to use checksums
e0a408b3ba99b1b0927bef4530516207b907edfe2b519c57115c471246ef4350
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.9

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

Download URL ropey-0.0.4_alpha-cp310-none-win_amd64.whl
Size 198.2 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
d7f8ea0e9862e2b8a502aa0e69b9959aea6047cbec9d61ae3b841267a387b674
BLAKE2b-256 checksum
How to use checksums
f9dd874d999d4d50e8a4cf26f0de9edfdfc99768518cfa09437ab462038d22f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.9

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

Download URL ropey-0.0.4_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
c02f22d48e5ea5f830dd015bba22e4bbed131d6672b632bd236160aad732bf19
BLAKE2b-256 checksum
How to use checksums
11ee304351e829c188b86f397a389521f2bef2649319980d4a059c1245ba4f07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.9

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

Download URL ropey-0.0.4_alpha-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Size 589.8 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
bd68efa3dfc60ff204b36ffee4c19a4500af9b1620820ceb2015523cb3e3cd31
BLAKE2b-256 checksum
How to use checksums
a04f0b79294310ff25d60938466e312b0de0322b9478689525c83289bc7589f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.9

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

Download URL ropey-0.0.4_alpha-cp39-none-win_amd64.whl
Size 198.1 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
c260bd35d0cf424ebb2126ebca95f1714c67695240bf8bf3231539bb57774086
BLAKE2b-256 checksum
How to use checksums
6ca2b22b7dfd0eb8fd52e8b982d58cab66cb62ac2f8d0fb80247395f970231e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.9

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

Download URL ropey-0.0.4_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
bd92ff40e4dc232bfb39690fd30f3aad2732b2c38a3e3d8576d4a1689cb240e0
BLAKE2b-256 checksum
How to use checksums
26b4a8b9cfec6333e91d0a0058df64bfa8913a33f17dc22d65532e7833481ce6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.9

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

Download URL ropey-0.0.4_alpha-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Size 590.3 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
92e0ec7428bda2530212aba21228d374687eed2b884d892c6a375d993e5adcec
BLAKE2b-256 checksum
How to use checksums
73439775e61f28d54db3a84e1af890d189008ef5453b3e302f643720c295fd16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.9

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

Download URL ropey-0.0.4_alpha-cp38-none-win_amd64.whl
Size 198.0 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
53ca38286b8370f3ab73d2388b5848223926c196c14ee2c540b2e5c8683877e4
BLAKE2b-256 checksum
How to use checksums
40cb36b307000daaf8c173dcc4d96a81a97b08f07a1a6ae903d976c5b203a608
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.9

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

Download URL ropey-0.0.4_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
bd8e9da03ace2cb2219a6e042fc0901220c205237df462075f66aa1b3ed955ee
BLAKE2b-256 checksum
How to use checksums
85c427f2237adc3f5f5a97d34bdc139ed1d4334c67a36b31b637770e034cafd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.9

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

Download URL ropey-0.0.4_alpha-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Size 590.2 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
bb9b5dd05ca44a79c677d9cafb1128eba1e681ecd2b1401fcdb6f4ba4ee2a630
BLAKE2b-256 checksum
How to use checksums
1cc92140fc6fa7b30e0f24d1f11818642554e5d79d145d3cfebb03e072ae82d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.9

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

Download URL ropey-0.0.4_alpha-cp37-none-win_amd64.whl
Size 197.9 kB
Tags CPython 3.7 Windows x86-64
SHA-256 checksum
How to use checksums
53870709971e475813254a9a8514d165e26a24915eb456c8c5585ee3391a0e07
BLAKE2b-256 checksum
How to use checksums
e95dfcbb1df6880d8687c99126d4256fa8050b3a98f424cf6f93520afda46302
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.9

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

Download URL ropey-0.0.4_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
6d940c8375308c02e1323085d13c346f8a493854a0308996b9aa49d4083425f4
BLAKE2b-256 checksum
How to use checksums
0b61af3167e79dfde6e209682fa2c51208fe574e3a6a1a091b00cb4bc3d36d16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.9

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

Download URL ropey-0.0.4_alpha-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Size 590.2 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
cb74fea912e81cde1765970a0f33c4ad805a48ccf04e5c36438ed5bd5ab8adea
BLAKE2b-256 checksum
How to use checksums
0ddfd5873b83f26c509432f1796f16b2488a3466fc85b895a8743679631a228b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.9

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

Download URL ropey-0.0.4_alpha-cp36-none-win_amd64.whl
Size 197.5 kB
Tags CPython 3.6 Windows x86-64
SHA-256 checksum
How to use checksums
6e37f3f9b869d47097eb8c4338035cd4c4f56fd42f311123536aca1be25512cd
BLAKE2b-256 checksum
How to use checksums
6801356326070387294d16abcf02e4272e0641811570a1acec8d7fc81e043d9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.9

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

Download URL ropey-0.0.4_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
cbf0ebe79bfb73b81ecc8f8705f56536e58523e8a24fb396b0e2670cec76f89b
BLAKE2b-256 checksum
How to use checksums
9032c72538956c58735e9689d10182c212bf3780683f5b82db17981e88e99325
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.9
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