A package to retrieve and sort DynamoDB posts by likes.
Project description
filteration-post
A Python package to retrieve all posts from a DynamoDB table and return them sorted by likes in descending order.
Build and Upload the Package to PyPI
ßßß
Prerequisites
-
Install
twineandwheelsetuptools:pip install twine wheel setuptools
Build the Package
In the root directory (ammar_filter_post/), run:
python setup.py sdist bdist_wheel
Upload to PyPI First, create an account on PyPI if you haven't already.
twine upload dist/*
You will be prompted to enter your PyPI username and password.
How to install the Library
pip install ammar_filter_post
How to use the Library
import boto3
from ammar_filter_post.ammar_filter_post import get_posts_sorted_by_likes
# Replace 'your-region' and 'YourTableName' with your actual AWS region and DynamoDB table name
dynamodb = boto3.resource('dynamodb', region_name='your-region')
table = dynamodb.Table('YourTableName')
sorted_posts = get_posts_sorted_by_likes(table)
for post in sorted_posts:
print(post)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ammar_filter_post-1.0.0.tar.gz.
File metadata
- Download URL: ammar_filter_post-1.0.0.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0df82163799a96eb0c33b54fdb8a467e3783c30e74c017fd7c4e1cc1c094f0e1
|
|
| MD5 |
337da2e9e41dd597e8cf2b4191e6de80
|
|
| BLAKE2b-256 |
0189b78a1ae8f24d00031f96782c074a4d30ae2dbd0406771427fa23b8f8f4c5
|
File details
Details for the file ammar_filter_post-1.0.0-py3-none-any.whl.
File metadata
- Download URL: ammar_filter_post-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d79bb9cfa53752b3871225798185811a1e10e689479066c337fdd2777a37b29
|
|
| MD5 |
ca0822ede648ceac24ad5a359be57514
|
|
| BLAKE2b-256 |
eaae98527488c957bf15a74600ecd155759ab9efca0ee84b8ec0cd1532212367
|