If so you can download any of the below versions for testing. The product will function as normal except for an evaluation limitation. At the time of purchase we provide a license file via email that will allow the product to work in its full capacity. If you would also like an evaluation license to test without any restrictions for 30 days, please follow the directions provided here.
If you experience errors, when you try to download a file, make sure your network policies (enforced by your company or ISP) allow downloading ZIP and/or MSI files.

Εγκατάσταση
Το πακέτο είναι available στο PyPI και μπορεί να εγκατασταθεί μέσω pip εκτελώντας την παρακάτω εντολή:
pip install groupdocs-editor-cloud

Απαιτήσεις
Εξαρτήσεις
Το SDK εγκαθιστά αυτόματα τα ακόλουθα πακέτα:
| Πακέτο | Περιορισμός |
|---|
| urllib3 | >= 1.15 |
| six | >= 1.10 |
| certifi | — |
| python-dateutil | — |
Γρήγορη εκκίνηση
Λάβετε τα διαπιστευτήρια API σας
Για να χρησιμοποιήσετε το GroupDocs.Editor Cloud, εγγραφείτε στο GroupDocs.Cloud Dashboard και λάβετε το Client ID και το Client Secret.
Εκκινήστε το API
Χρησιμοποιήστε τον ακόλουθο κώδικα για να ξεκινήσετε να χρησιμοποιείτε το GroupDocs.Editor Cloud SDK για Python:
import groupdocs_editor_cloud
# Get your ClientId and ClientSecret at https://dashboard.groupdocs.cloud
client_id = "YourClientId"
client_secret = "YourClientSecret"
# Create API configuration
configuration = groupdocs_editor_cloud.Configuration(client_id, client_secret)
configuration.api_base_url = "https://api.groupdocs.cloud"
# Create instance of the Edit API
edit_api = groupdocs_editor_cloud.EditApi.from_config(configuration)
Επεξεργαστείτε ένα έγγραφο του Word
Μόλις αρχικοποιηθεί, χρησιμοποιήστε αυτό το βασικό παράδειγμα για να φορτώσετε ένα αρχείο DOCX, να επεξεργαστείτε την αναπαράστασή του σε HTML και να αποθηκεύσετε το αποτέλεσμα:
import groupdocs_editor_cloud
edit_api = groupdocs_editor_cloud.EditApi.from_keys("YourClientId", "YourClientSecret")
file_api = groupdocs_editor_cloud.FileApi.from_keys("YourClientId", "YourClientSecret")
file_info = groupdocs_editor_cloud.FileInfo("WordProcessing/password-protected.docx", None, None, "password")
load_options = groupdocs_editor_cloud.WordProcessingLoadOptions()
load_options.file_info = file_info
load_options.output_path = "output"
load_result = edit_api.load(groupdocs_editor_cloud.LoadRequest(load_options))
html_file = file_api.download_file(groupdocs_editor_cloud.DownloadFileRequest(load_result.html_path))
with open(html_file, "r") as file:
html = file.read()
html = html.replace("Sample test text", "Hello world")
with open(html_file, "w") as file:
file.write(html)
file_api.upload_file(groupdocs_editor_cloud.UploadFileRequest(load_result.html_path, html_file))
save_options = groupdocs_editor_cloud.WordProcessingSaveOptions()
save_options.file_info = file_info
save_options.output_path = "output/edited.docx"
save_options.html_path = load_result.html_path
save_options.resources_path = load_result.resources_path
save_result = edit_api.save(groupdocs_editor_cloud.SaveRequest(save_options))
print("Document edited: " + save_result.path)
Με αυτόν τον οδηγό γρήγορης εκκίνησης, είστε έτοιμοι να αρχίσετε να επεξεργάζεστε έγγραφα χρησιμοποιώντας το GroupDocs.Editor Cloud στις εφαρμογές Python σας. Για περισσότερες λεπτομέρειες, επισκεφθείτε το documentation.
Λάβετε υποστηριζόμενους τύπους αρχείων
Ανακτήστε την πλήρη λίστα των υποστηριζόμενων μορφών αρχείων που είναι διαθέσιμες μέσω του Editor API.
import groupdocs_editor_cloud
info_api = groupdocs_editor_cloud.InfoApi.from_keys("YourClientId", "YourClientSecret")
result = info_api.get_supported_file_formats()
for fmt in result.formats:
print(fmt.file_format)
Λήψη πληροφοριών εγγράφου
Ανάκτηση μεταδεδομένων εγγράφων, όπως ο αριθμός σελίδων και η κατάσταση προστασίας με κωδικό πρόσβασης.
import groupdocs_editor_cloud
info_api = groupdocs_editor_cloud.InfoApi.from_keys("YourClientId", "YourClientSecret")
file_info = groupdocs_editor_cloud.FileInfo("WordProcessing/password-protected.docx", None, None, "password")
result = info_api.get_info(groupdocs_editor_cloud.GetInfoRequest(file_info))
print("Page count = " + str(result.page_count))
Επεξεργασία εγγράφου υπολογιστικού φύλλου
Φορτώστε ένα συγκεκριμένο φύλλο εργασίας από ένα αρχείο XLSX, επεξεργαστείτε το περιεχόμενό του σε HTML και αποθηκεύστε ξανά σε μορφή υπολογιστικού φύλλου.
import groupdocs_editor_cloud
edit_api = groupdocs_editor_cloud.EditApi.from_keys("YourClientId", "YourClientSecret")
file_api = groupdocs_editor_cloud.FileApi.from_keys("YourClientId", "YourClientSecret")
file_info = groupdocs_editor_cloud.FileInfo("Spreadsheet/four-sheets.xlsx")
load_options = groupdocs_editor_cloud.SpreadsheetLoadOptions()
load_options.file_info = file_info
load_options.output_path = "output"
load_options.worksheet_index = 0
load_result = edit_api.load(groupdocs_editor_cloud.LoadRequest(load_options))
html_file = file_api.download_file(groupdocs_editor_cloud.DownloadFileRequest(load_result.html_path))
with open(html_file, "r") as file:
html = file.read()
html = html.replace("This is sample sheet", "This is sample sheep")
with open(html_file, "w") as file:
file.write(html)
file_api.upload_file(groupdocs_editor_cloud.UploadFileRequest(load_result.html_path, html_file))
save_options = groupdocs_editor_cloud.SpreadsheetSaveOptions()
save_options.file_info = file_info
save_options.output_path = "output/edited.xlsx"
save_options.html_path = load_result.html_path
save_options.resources_path = load_result.resources_path
save_result = edit_api.save(groupdocs_editor_cloud.SaveRequest(save_options))
print("Document edited: " + save_result.path)
Επεξεργασία εγγράφου παρουσίασης
Φορτώστε μια συγκεκριμένη διαφάνεια από ένα αρχείο PPTX, επεξεργαστείτε το περιεχόμενό του σε HTML και αποθηκεύστε ξανά στη μορφή παρουσίασης.
import groupdocs_editor_cloud
edit_api = groupdocs_editor_cloud.EditApi.from_keys("YourClientId", "YourClientSecret")
file_api = groupdocs_editor_cloud.FileApi.from_keys("YourClientId", "YourClientSecret")
file_info = groupdocs_editor_cloud.FileInfo("Presentation/with-notes.pptx")
load_options = groupdocs_editor_cloud.PresentationLoadOptions()
load_options.file_info = file_info
load_options.output_path = "output"
load_options.slide_number = 0
load_result = edit_api.load(groupdocs_editor_cloud.LoadRequest(load_options))
html_file = file_api.download_file(groupdocs_editor_cloud.DownloadFileRequest(load_result.html_path))
with open(html_file, "r") as file:
html = file.read()
html = html.replace("Slide sub-heading", "Hello world!")
with open(html_file, "w") as file:
file.write(html)
file_api.upload_file(groupdocs_editor_cloud.UploadFileRequest(load_result.html_path, html_file))
save_options = groupdocs_editor_cloud.PresentationSaveOptions()
save_options.file_info = file_info
save_options.output_path = "output/edited.pptx"
save_options.html_path = load_result.html_path
save_options.resources_path = load_result.resources_path
save_result = edit_api.save(groupdocs_editor_cloud.SaveRequest(save_options))
print("Document edited: " + save_result.path)
Επεξεργασία εγγράφου DSV
Φορτώστε ένα αρχείο τιμών διαχωρισμένων με οριοθέτες, επεξεργαστείτε την αναπαράστασή του σε HTML και αποθηκεύστε ξανά σε μορφή TSV.
import groupdocs_editor_cloud
edit_api = groupdocs_editor_cloud.EditApi.from_keys("YourClientId", "YourClientSecret")
file_api = groupdocs_editor_cloud.FileApi.from_keys("YourClientId", "YourClientSecret")
file_info = groupdocs_editor_cloud.FileInfo("Spreadsheet/sample.tsv")
load_options = groupdocs_editor_cloud.DelimitedTextLoadOptions()
load_options.file_info = file_info
load_options.output_path = "output"
load_result = edit_api.load(groupdocs_editor_cloud.LoadRequest(load_options))
html_file = file_api.download_file(groupdocs_editor_cloud.DownloadFileRequest(load_result.html_path))
with open(html_file, "r") as file:
html = file.read()
html = html.replace("32", "66")
with open(html_file, "w") as file:
file.write(html)
file_api.upload_file(groupdocs_editor_cloud.UploadFileRequest(load_result.html_path, html_file))
save_options = groupdocs_editor_cloud.DelimitedTextSaveOptions()
save_options.file_info = file_info
save_options.output_path = "output/edited.tsv"
save_options.html_path = load_result.html_path
save_options.resources_path = load_result.resources_path
save_result = edit_api.save(groupdocs_editor_cloud.SaveRequest(save_options))
print("Document edited: " + save_result.path)
Επεξεργασία εγγράφου κειμένου
Φορτώστε ένα αρχείο απλού κειμένου, επεξεργαστείτε την αναπαράστασή του σε HTML και αποθηκεύστε το αποτέλεσμα.
import groupdocs_editor_cloud
edit_api = groupdocs_editor_cloud.EditApi.from_keys("YourClientId", "YourClientSecret")
file_api = groupdocs_editor_cloud.FileApi.from_keys("YourClientId", "YourClientSecret")
file_info = groupdocs_editor_cloud.FileInfo("Text/document.txt")
load_options = groupdocs_editor_cloud.TextLoadOptions()
load_options.file_info = file_info
load_options.output_path = "output"
load_result = edit_api.load(groupdocs_editor_cloud.LoadRequest(load_options))
html_file = file_api.download_file(groupdocs_editor_cloud.DownloadFileRequest(load_result.html_path))
with open(html_file, "r") as file:
html = file.read()
html = html.replace("Page Text", "New Text")
with open(html_file, "w") as file:
file.write(html)
file_api.upload_file(groupdocs_editor_cloud.UploadFileRequest(load_result.html_path, html_file))
save_options = groupdocs_editor_cloud.TextSaveOptions()
save_options.file_info = file_info
save_options.output_path = "output/edited.txt"
save_options.html_path = load_result.html_path
save_options.resources_path = load_result.resources_path
save_result = edit_api.save(groupdocs_editor_cloud.SaveRequest(save_options))
print("Document edited: " + save_result.path)
Δείγματα έργων στο GitHub
Ο GroupDocs.Editor Cloud Python Samples το αποθετήριο περιλαμβάνει έτοιμα προς εκτέλεση παραδείγματα που καλύπτουν:
| Κατηγορία | Παραδείγματα |
|---|
| GetSupportedFileTypes | Υποστηριζόμενοι τύποι αρχείων |
| Λήψη πληροφοριών | Πληροφορίες εγγράφου (πλήθος σελίδων, κατάσταση κωδικού πρόσβασης) |
| Επεξεργασία Λειτουργίες — Word | Επεξεργασία εγγράφων επεξεργασίας κειμένου (συμπεριλαμβανομένων των προστατευμένων με κωδικό πρόσβασης) |
| Επεξεργασία Λειτουργίες — Υπολογιστικό φύλλο | Επεξεργασία εγγράφων υπολογιστικού φύλλου με επιλογή φύλλου εργασίας |
| EditOperations — Παρουσίαση | Επεξεργασία εγγράφων παρουσίασης με επιλογή διαφανειών |
| EditOperations — DSV | Επεξεργασία εγγράφων τιμών διαχωρισμένων με οριοθέτες (CSV, TSV) |
| Επεξεργασία Λειτουργίες — Κείμενο | Επεξεργασία εγγράφων απλού κειμένου |
Πώς να εκτελέσετε τα παραδείγματα
- Κλωνοποιήστε ή κατεβάστε το samples repository2. Επεξεργασία
Examples/RunExamples.py και ρυθμίστε το δικό σας client_id και client_secret3. Πηγαίνετε στο Examples καταλόγου - Τρέξε
pip install groupdocs-editor-cloud -U5. Εκτελέστε python RunExamples.py
Για περισσότερες λεπτομέρειες, επισκεφθείτε Getting Started.

Ετικέτες
Document Editing API | Python Cloud API | GroupDocs.Editor Cloud | REST API | Word Processing Formats | Spreadsheet Formats | Presentation Formats | Text Formats | CSV Files | DOCX Documents | XLSX Documents | PPTX Presentations | Password-Protected Files | Cloud Storage Integration | Document Info Retrieval | File Operations | WYSIWYG Editing | Multi-Platform Support | Secure API Access | HTML Editing | Cross-platform API