README for cd_wp_api Package Description The cd_wp_api package is designed for interacting with WordPress APIs, providing a convenient way to access and manipulate WordPress data programmatically. This package simplifies the process of connecting to the WordPress API, performing CRUD operations, and handling WordPress-specific data structures.
Features WordPress API Integration: Functions for connecting to the WordPress API. CRUD Operations: Create, read, update, and delete WordPress resources. Data Handling: Tools to handle and parse data returned from WordPress. (Note: Specific functions and their parameters should be listed here.)
Installation To install the cd_wp_api package, use the following command:
bash Copy code pip install cd_wp_api Usage Connecting to the WordPress API python Copy code from cd_wp_api import WPAPI
Initialize the API
wp_api = WPAPI('your_wordpress_site_url', 'username', 'password') Creating a New Post python Copy code post_data = { 'title': 'My New Post', 'content': 'Content of the post', 'status': 'publish' } response = wp_api.create_post(post_data) Scheduling a Post python Copy code from datetime import datetime, timedelta
Schedule a post for 1 day later
future_date = datetime.now() + timedelta(days=1) scheduled_post = { 'title': 'Future Post', 'content': 'This post is scheduled for the future.', 'status': 'future', 'date': future_date.isoformat() # ISO 8601 format } response = wp_api.create_post(scheduled_post) Adding Tags/Keywords to a Post python Copy code post_data_with_tags = { 'title': 'Post with Tags', 'content': 'This is a post with tags.', 'status': 'publish', 'tags': ['tag1', 'tag2', 'tag3'] # List of tags or tag IDs } response = wp_api.create_post(post_data_with_tags) Documentation For more documentation, please go to Code Docta.
Versioning To check the current version of the package:
python Copy code from cd_wp_api import version print(version) Contribution Contributions are welcome. Please follow the coding standards and write tests for new features.
License This package is licensed under [appropriate license, e.g., MIT].
Release files for cd-wp-api 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cd_wp_api-0.0.1.tar.gz | 4.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cd_wp_api-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.2 kB
Release files / cd_wp_api-0.0.1.tar.gz
| Download URL | cd_wp_api-0.0.1.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a80e5326fbd2b4c473d2b056e7ee486a782b237c575089c193895cab08c89218
|
|
BLAKE2b-256 checksum How to use checksums |
82b99653d19344dbc987860f167a9c56d4eacd1b6cbb8512ebb7272bb796ccb2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / cd_wp_api-0.0.1-py3-none-any.whl
| Download URL | cd_wp_api-0.0.1-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
186cc53cd6316889063ab665cecea12d85a7cb9c931baa3d7f64034f7ed2e5d7
|
|
BLAKE2b-256 checksum How to use checksums |
233c33d5be936d1e003e5d6e757c34ef3be6d852a08420c510687c5195b9b22c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|