Recent submissions

Comment · 8 years ago
You need to learn `ObjectPath` query language.

In `dictquery` I use simple and easy to understand language.

BUT My project is exercise and it is obviously not a competitor to mature, community supported libs.

That is why i do not want to compare `dictquery` to other libs

Comment · 8 years ago
fixed by `mattcaldwell`
Comment · 8 years ago
Yes. You are right. But I wanted the way to store my queries in any major database. And I wanted natural simple queries.

If I need to check my dictionary I want to use something similar to natural language.

lambdas and filters are greate, but not obvious at a glance.

If I want to check my dict: "Username is 'john' and age is greater than 23"

I will make this query: "`username` == 'john' and `age` > 23"

This query is obvious (i hope it is) for anyone from first glance

Comment · 8 years ago
Yes, I wanted SQL like syntax and I'm happy it feels like this
Comment · 8 years ago
I can use other symbol than back tick. But what symbol fits here better? what symbol would you use?
Comment · 8 years ago
if you need a nested key value, you can use function:

    def get_dict_value(query_dict, dict_key, use_nested_keys=True,
                       key_separator='.', raise_keyerror=False):

theoretically i can make alternative syntax.

The plus of "stringly API" is that you can save your queries in database, or get it through web interface

Comment · 8 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton