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

  • SEARCH
  • Home
  • 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 8710617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:40:19+00:00 2026-06-13T04:40:19+00:00

Using the IN operation in a Google App Engine query is limited to 30

  • 0

Using the IN operation in a Google App Engine query is limited to 30 items in the list per query, so I have to find a way to break up the list into multiple lists with a maximum of 30 items in each array, and query each sub array.

I’ve come up with a small solution to do this, but it’s very inelegant, and I’m not sure if this is the best way to do this. I’m new to Python, so I’m wondering how I might do this correctly or more elegantly?

I’m querying for User.query(User.email IN emails)

max_length = 30
iter_count = len(emails) / max_length
for i in range(iter_count):         
    min = i  * max_length
    max = (i + 1) * max_length
    if min > len(emails):
       break
    if max > len(emails):
       max = len(emails)

    current_array = emails[min:max]
    # query this array
  • 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-13T04:40:20+00:00Added an answer on June 13, 2026 at 4:40 am
    max_length = 30
    for i in xrange(0, len(emails), max_length):
        current_array = emails[i:i+max_length]
        # query this array
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a google app engine app that is using Django templates. I am
Using Django templates in Google App Engine (on Python), is it possible to compare
I'm using the python API for Google App Engine, and what I am trying
I am building an application with Python 2.7 using the Google App Engine framework.
I have a Google App Engine app where I need to store text files
I have setup SSL (VIP) for a custom domain on my Google App Engine
I am using Eclipse/PyDev to develop a Google App Engine project called GAEServer. One
I'm currently porting some work from MySQL to Google App Engine/Java. I'm using JDO,
I am writing a java application on Google App Engine(GAE) using objectify for datastore
I am using the control library from http://code.google.com/p/gong-wpf-dragdrop/successfully for my listbox dragging operation.But there

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.