Skip to main content

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 twine and wheel setuptools:

    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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ammar_filter_post-1.0.0.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ammar_filter_post-1.0.0-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

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

Hashes for ammar_filter_post-1.0.0.tar.gz
Algorithm Hash digest
SHA256 0df82163799a96eb0c33b54fdb8a467e3783c30e74c017fd7c4e1cc1c094f0e1
MD5 337da2e9e41dd597e8cf2b4191e6de80
BLAKE2b-256 0189b78a1ae8f24d00031f96782c074a4d30ae2dbd0406771427fa23b8f8f4c5

See more details on using hashes here.

File details

Details for the file ammar_filter_post-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ammar_filter_post-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1d79bb9cfa53752b3871225798185811a1e10e689479066c337fdd2777a37b29
MD5 ca0822ede648ceac24ad5a359be57514
BLAKE2b-256 eaae98527488c957bf15a74600ecd155759ab9efca0ee84b8ec0cd1532212367

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page