Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8806143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:03:36+00:00 2026-06-14T02:03:36+00:00

I want to periodically (every hour?) query the Python Package Index API from Plone.

  • 0

I want to periodically (every hour?) query the Python Package Index API from Plone. Something equivalent to:

$ for i in `yolk -L 24 | awk '{print $1}'` # get releases made in last 24 hours
do
  # search for plone classifier
  results=`yolk -M $i -f classifiers  | grep -i plone`
  if [ $results ]; then
    echo $i
  fi
done

Results:

collective.sendaspdf
gocept.selenium
Products.EnhancedNewsItemImage
adi.workingcopyflag
Products.SimpleCalendarPortlet
Products.SimpleCalendar

Then I want to display this information in a template. I would love to, at least initially, avoid having to persist the results.

How do I display the results in a template without having to wait for the query to finish? I know there are some async packages available e.g.:

  • plone.app.async

But I’m not sure what the general approach should be (assuming I can schedule an async task, I may need to store the results somewhere. If I have to store the results, I’d prefer to do it “lightweight” e.g. annotations)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T02:03:37+00:00Added an answer on June 14, 2026 at 2:03 am

    How about the low, low tech version?

    Use a cron-job to run the query, put this in a temp file, then move the file into a known location, with a timestamp in the filename.

    Then, when someone requests the page in question (showing new packages), simply read the newest file in that location:

    filename = sorted(os.listdir(location))[-1]
    data = open(os.path.join(location, filename)).read()
    

    By using a move, you guarantee that the newest file in the designated location is always a complete file, avoiding a partial result being read.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to periodically query a PHP script for new messages. To do so,
I have and issue where i want to collect GPS data periodically, say every
I want to run a function periodically every 1 second, so after 10 seconds
I have a text file that's appended to over time and periodically I want
Want to run javascript function from parent window in child window Example I have
Want to open firefox from terminal at linux with firebug enabled // Terminal $
Every day in my server are copied some images via ftp.I want for every
So I want to have a feature like: Random Post of the hour for
I implement a UITableView of UIImageView cells, each of which periodically refreshes itself every
I want to extend a common security check to nearly every view of my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.