Package Search Help

You can use boolean logic (e.g. AND/OR/NOT) for complex search queries. For more help and examples, see the search documentation.

Search by package name:
my-package (implicit)
name:my-package (explicit)

Search by package filename:
my-package.ext (implicit)
filename:my-package.ext (explicit)

Search by package tag:
latest (implicit)
tag:latest (explicit)

Search by package version:
1.0.0 (implicit)
version:1.0.0 (explicit)
prerelease:true (prereleases)
prerelease:false (no prereleases)

Search by package architecture:
architecture:x86_64 

Search by package distribution:
distribution:el 

Search by package license:
license:MIT 

Search by package format:
format:deb 

Search by package status:
status:in_progress 

Search by package file checksum:
checksum:5afba 

Search by package security status:
severity:critical 

Search by package vulnerabilities:
vulnerabilities:>1 
vulnerabilities:<1000 

Search by # of package downloads:
downloads:>8 
downloads:<100 

Search by package type:
type:binary 
type:source 

Search by package size (bytes):
size:>50000 
size:<10000 

Search by dependency name/version:
dependency:log4j 
dependency:log4j=1.0.0 
dependency:log4j>1.0.0 

Search by uploaded date:
uploaded:>"1 day ago" 
uploaded:<"August 14, 2022 EST" 

Search by entitlement token (identifier):
entitlement:3lKPVJPosCsY 

Search by policy violation:
policy_violated:true
deny_policy_violated:true
license_policy_violated:true
vulnerability_policy_violated:true

Search by repository:
repository:repo-name

Search queries for all Debian-specific (and related) package types

Search by component:
deb_component:unstable

Search queries for all Maven-specific (and related) package types

Search by group ID:
maven_group_id:org.apache

Search queries for all Docker-specific (and related) package types

Search by image digest:
docker_image_digest:sha256:7c5..6d4
(full hashref only)

Search by layer digest:
docker_layer_digest:sha256:4c4..ae4
(full hashref only)

Field type modifiers (depending on the type, you can influence behaviour)

For all queries, you can use:
~foo for negation

For string queries, you can use:
^foo to anchor to start of term
foo$ to anchor to end of term
foo*bar for fuzzy matching

For number/date or version queries, you can use:
>foo for values greater than
>=foo for values greater / equal
<foo for values less than
<=foo for values less / equal

Need a secure and centralised artifact repository to deliver Alpine, Cargo, CocoaPods, Composer, Conan, Conda, CRAN, Dart, Debian, Docker, Go, Helm, Hex, LuaRocks, Maven, npm, NuGet, P2, Python, RedHat, Ruby, Swift, Terraform, Vagrant, Raw & More packages?

Cloudsmith is the new standard in Package / Artifact Management and Software Distribution.

With support for all major package formats, you can trust us to manage your software supply chain.

Start My Free Trial
 Open-Source typedb typedb (TypeDB) / public-snapshot  GitHub Project
A certifiably-awesome open-source package repository curated by TypeDB, hosted by Cloudsmith.
Note: Packages in this repository are licensed as GNU Affero General Public License v3.0 (dependencies may be licensed differently).

Python logo typeql-grammar  0.0.0+ac36f755d38beeb76bfc8…

One-liner (summary)

TypeQL Grammar for Python

Description

[![TypeQL](./banner.png)](https://typedb.com/docs/typeql/2.x/overview)

[![Factory](https://factory.vaticle.com/api/status/vaticle/typeql/badge.svg)](https://factory.vaticle.com/vaticle/typeql) [![GitHub release](https://img.shields.io/github/release/vaticle/typeql.svg)](https://github.com/vaticle/typeql/releases/latest) [![Discord](https://img.shields.io/discord/665254494820368395?color=7389D8&label=chat&logo=discord&logoColor=ffffff)](https://typedb.com/discord) [![Discussion Forum](https://img.shields.io/badge/discourse-forum-blue.svg)](https://forum.typedb.com) [![Stack Overflow](https://img.shields.io/badge/stackoverflow-typedb-796de3.svg)](https://stackoverflow.com/questions/tagged/typedb) [![Stack Overflow](https://img.shields.io/badge/stackoverflow-typeql-3dce8c.svg)](https://stackoverflow.com/questions/tagged/typeql) [![Hosted By: Cloudsmith](https://img.shields.io/badge/OSS%20hosting%20by-cloudsmith-blue?logo=cloudsmith&style=flat)](https://cloudsmith.com)

# Introducing TypeQL

TypeQL is the query language of [TypeDB](https://github.com/vaticle/typedb).

  • Conceptual and intuitive. TypeQL is based directly on the [conceptual data model](https://development.typedb.com/philosophy) of TypeDB. Its queries comprise sequences of statements that assemble into [patterns](https://development.typedb.com/features#modern-language). This mirrors natural language and makes it easy and intuitive to express even highly complex queries.
  • Fully declarative and composable TypeQL is fully declarative, allowing us to define query patterns without considering execution strategy. The user only composes sets of requirements, and TypeDB finds all matching data to process.
  • A fully variablizable language. Any concept in TypeQL has a type, and so any concept in TypeQL can be variablized in a query – even types! This enables TypeQL to express powerful [parametric](https://typedb.com/features#polymorphic-queries) database operations.
  • Built for consistency. TypeQL patterns are underpinned by a powerful type system that ensure safety and consistency of database applications.

For a quick overview of the range of statements that are available in TypeQL check out our [TypeQL in 20 queries guide](https://typedb.com/docs/).

> IMPORTANT NOTE: > > TypeDB & TypeQL are in the process of being rewritten in [Rust](https://www.rust-lang.org). There will be significant refinement to the language, and minor breaks in backwards compatibility. Learn about the changes on our [roadmap issue on GitHub](https://github.com/vaticle/typedb/issues/6764). The biggest change to TypeDB 3.0 will be our storage data structure and architecture that significantly boosts performance. We’re aiming to release 3.0 in the summer this year, along with preliminary benchmarks of TypeDB.

## A polymorphic query language

### Define types, inheritance, and interfaces

TypeQL features the type system of the [Polymorphic Entity-Relation-Attribute](https://typedb.com/philosophy) (PERA) model: entities are independent concepts, relations depend on role interfaces played by either entities or relations, and attributes are properties with a value that can interface with (namely, be owned by) entities or relations. Entities, relations, and attributes are all considered first-class citizens and can be subtyped, allowing for expressive modeling without the need for normalization or reification.

```php define

id sub attribute, value string; email sub id; path sub id; name sub id;

user sub entity,
owns email @unique, plays permission:subject, plays request:requestee;
file sub entity,
owns path, plays permission:object;
action sub entity,
owns name, plays permission:action;
permission sub relation,
relates subject, relates object, relates action, plays request:target;
request sub relation,
relates target, relates requestee;

```

### Write polymorphic database queries

Use subtyping to query a common supertype and automatically retrieve matching data. Variablize queries to return types, roles, and data. New types added to the schema are automatically included in the results of pre-existing queries against their supertype, so no refactoring is necessary.

``` match $user isa user,

has full-name $name, has email $email;

# This returns all users of any type

match $user isa employee,
has full-name $name, has email $email, has employee-id $id;

# This returns only users who are employees

match $user-type sub user; $user isa $user-type,

has full-name $name, has email $email;

# This returns all users and their type ```

## Building queries with ease

### Gain clarity through natural and fully declarative syntax

TypeQL's near-natural syntax and fully declarative properties make queries easily understandable, reducing the learning curve and easing maintenance. This allows you to define query patterns without considering execution strategy. TypeDB's query planner always optimizes queries, so you don't have to worry about the logical implementation.

```php match $kevin isa user, has email "kevin@vaticle.com";

insert $chloe isa full-time-employee,

has full-name "Chloé Dupond", has email "chloe@vaticle.com", has employee-id 185, has weekly-hours 35;
$hire (employee: $chloe, ceo: $kevin) isa hiring,
has date 2023-09-27;

```

### Develop modularly with fully composable query patterns

TypeDB's TypeQL query language uses pattern matching to find data. Patterns in TypeQL are fully composable. Every complex pattern can be broken down into a conjunction of atomic constraints, which can be concatenated in any order. Any pattern composed of valid constraints is guaranteed to be valid itself, no matter how complex.

```php match $user isa user;

match $user isa user; $user has email "john@vaticle.com";

match $user isa user; $user has email "john@vaticle.com"; (team: $team, member: $user) isa team-membership;

match $user isa user; $user has email "john@vaticle.com"; (team: $team, member: $user) isa team-membership; $team has name "Engineering"; ```

## TypeQL grammar

> Note: All TypeDB Clients, as well as TypeDB Console, accept TypeQL syntax natively. > If you are using TypeDB, you do not need additional libraries/tools to use TypeQL syntax natively. > However, if you would like to construct TypeQL queries programmatically, you can do so with "Language Libraries" listed below.

## Resources

### Developer resources

### Useful links

If you want to begin your journey with TypeDB, you can explore the following resources:

## Contributions

TypeDB and TypeQL are built using various open-source frameworks and technologies throughout its evolution. Today TypeDB and TypeQL use [Speedb](https://www.speedb.io/), [pest](https://pest.rs/), [SCIP](https://www.scipopt.org), [Bazel](https://bazel.build), [gRPC](https://grpc.io), [ZeroMQ](https://zeromq.org), and [Caffeine](https://github.com/ben-manes/caffeine).

Thank you!

In the past, TypeDB was enabled by various open-source products and communities that we are hugely thankful to: [RocksDB](https://rocksdb.org), [ANTLR](https://www.antlr.org), [Apache Cassandra](http://cassandra.apache.org), [Apache Hadoop](https://hadoop.apache.org), [Apache Spark](http://spark.apache.org), [Apache TinkerPop](http://tinkerpop.apache.org), and [JanusGraph](http://janusgraph.org).

### Package hosting Package repository hosting is graciously provided by [Cloudsmith](https://cloudsmith.com). Cloudsmith is the only fully hosted, cloud-native, universal package management solution, that enables your organization to create, store and share packages in any format, to any place, with total confidence.

## Licensing

TypeQL grammar and language libraries are provided under the Mozilla Public License 2.0 (MPL 2.0), and therefore freely usable without restriction when unmodified.

The full license can be founder at: [LICENSE](https://github.com/vaticle/typeql/blob/master/LICENSE).

License

AGPLv3

Size

5.4 KB

Downloads

0

Tags

sdist gz noarch

Status  Completed
Checksum (MD5) b040563d70bc9cf5a0de1fba5fc25a1a
Checksum (SHA-1) 0ac445ec98a5176578179283edeedd48261a1f39
Checksum (SHA-256) 05ad56a8c1e82e7e2b7e3fc75cd685dc4f13d0f3947135018a037d020962c376
Checksum (SHA-512) 1296116ad60f067ce1890abbc50195cf29724da6a6702d559b63e4a0ffb8efe55d…
GPG Signature
GPG Fingerprint 43dc0336920ac3e94b31912517507562824cfdcc
Storage Region  Dublin, Ireland
Type  Source (contains source code or documentation)
Uploaded At 1 month ago
Uploaded By Uploaded by vaticle-bot
Slug Id typeql-grammar-000ac36f755d38beeb76bfc8241d97-a36p
Unique Id su2iwsJZ2EvS
Version (Raw) 0.0.0+ac36f755d38beeb76bfc8241d972e021bd911e50
Version (Parsed)
  • Major: 0
  • Minor: 0
  • Patch: 0
  • Type: SemVer (Strict)
  • Metadata: ac36f755d38beeb76bfc8241d972e021bd911e50
  extended metadata
Author Vaticle <community@vaticle.com>
Classifiers Environment :: Console | Intended Audience :: Developers | Intended Audience :: Science/Research | License :: OSI Approved :: Apache Software License | Operating System :: OS Independent | Programming Language :: Python | Programming Language :: Python :: 3 | Programming Language :: Python :: 3.5 | Programming Language :: Python :: 3.6 | Programming Language :: Python :: 3.7 | Programming Language :: Python :: 3.8 | Programming Language :: Python :: 3.9 | Topic :: Database :: Front-Ends
Homepage URL https://github.com/vaticle/typeql
Keywords typeql typedb database strongly-typed
Metadata Version 2.1
Py Filetype sdist
Requires Python >0
pkg typeql-grammar-0.0.0+ac36f755d3… 0
5.4 KB
md5 sha1 sha256 sha512
Package Contents (typeql-grammar-0.0.0+ac36f755d38beeb76bfc8241d972e021bd911e50.tar.gz)
Loading...

This package has 13 files/directories.

Security Scanning:
You can't see this because your subscription doesn't include this feature, sorry!

With Security Scanning, Cloudsmith will scan your artifacts for vulnerabilities when they're uploaded. These are then presented to you via the UI and the API, so that you can build rules into your CI/CD pipelines to decide how to handle low, medium, high and critical software vulnerabilities.

If you'd like to trial or ask about the Security Scanning feature, just ask us. We'll be happy to help!

Last scanned

6 days, 12 hours ago

Scan result

Vulnerable

Vulnerability count

2

Max. severity

Critical
Target:
CRITICAL

CVE-7275-47643: library: vulnerability title



Package Name: package_name
Installed Version: 1.3.87
Fixed Version: 2.3.25

References: wong.biz thornton.com www.lawrence.biz
LOW

CVE-4869-61915: library: vulnerability title



Package Name: package_name
Installed Version: 1.4.3
Fixed Version: 2.2.10

References: www.carter-rios.org williams.com www.holland-watson.com
Loading...

You can embed a badge in another website that shows this or the latest version of this package.

To embed the badge for this specific package version, use the following:

[![This version of 'typeql-grammar' @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/typedb/public-snapshot/python/typeql-grammar/0.0.0+ac36f755d38beeb76bfc8241d972e021bd911e50/a=noarch;xf=sdist;xn=typeql-grammar/?render=true)](https://cloudsmith.io/~typedb/repos/public-snapshot/packages/detail/python/typeql-grammar/0.0.0+ac36f755d38beeb76bfc8241d972e021bd911e50/a=noarch;xf=sdist;xn=typeql-grammar/)
|This version of 'typeql-grammar' @ Cloudsmith|
.. |This version of 'typeql-grammar' @ Cloudsmith| image:: https://api-prd.cloudsmith.io/v1/badges/version/typedb/public-snapshot/python/typeql-grammar/0.0.0+ac36f755d38beeb76bfc8241d972e021bd911e50/a=noarch;xf=sdist;xn=typeql-grammar/?render=true
   :target: https://cloudsmith.io/~typedb/repos/public-snapshot/packages/detail/python/typeql-grammar/0.0.0+ac36f755d38beeb76bfc8241d972e021bd911e50/a=noarch;xf=sdist;xn=typeql-grammar/
image::https://api-prd.cloudsmith.io/v1/badges/version/typedb/public-snapshot/python/typeql-grammar/0.0.0+ac36f755d38beeb76bfc8241d972e021bd911e50/a=noarch;xf=sdist;xn=typeql-grammar/?render=true[link="https://cloudsmith.io/~typedb/repos/public-snapshot/packages/detail/python/typeql-grammar/0.0.0+ac36f755d38beeb76bfc8241d972e021bd911e50/a=noarch;xf=sdist;xn=typeql-grammar/",title="This version of 'typeql-grammar' @ Cloudsmith"]
<a href="https://cloudsmith.io/~typedb/repos/public-snapshot/packages/detail/python/typeql-grammar/0.0.0+ac36f755d38beeb76bfc8241d972e021bd911e50/a=noarch;xf=sdist;xn=typeql-grammar/"><img src="https://api-prd.cloudsmith.io/v1/badges/version/typedb/public-snapshot/python/typeql-grammar/0.0.0+ac36f755d38beeb76bfc8241d972e021bd911e50/a=noarch;xf=sdist;xn=typeql-grammar/?render=true" alt="This version of 'typeql-grammar' @ Cloudsmith" /></a>

rendered as: This version of 'typeql-grammar' @ Cloudsmith

To embed the badge for the latest package version, use the following:

[![Latest version of 'typeql-grammar' @ Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/typedb/public-snapshot/python/typeql-grammar/latest/a=noarch;xf=sdist;xn=typeql-grammar/?render=true&show_latest=true)](https://cloudsmith.io/~typedb/repos/public-snapshot/packages/detail/python/typeql-grammar/latest/a=noarch;xf=sdist;xn=typeql-grammar/)
|Latest version of 'typeql-grammar' @ Cloudsmith|
.. |Latest version of 'typeql-grammar' @ Cloudsmith| image:: https://api-prd.cloudsmith.io/v1/badges/version/typedb/public-snapshot/python/typeql-grammar/latest/a=noarch;xf=sdist;xn=typeql-grammar/?render=true&show_latest=true
   :target: https://cloudsmith.io/~typedb/repos/public-snapshot/packages/detail/python/typeql-grammar/latest/a=noarch;xf=sdist;xn=typeql-grammar/
image::https://api-prd.cloudsmith.io/v1/badges/version/typedb/public-snapshot/python/typeql-grammar/latest/a=noarch;xf=sdist;xn=typeql-grammar/?render=true&show_latest=true[link="https://cloudsmith.io/~typedb/repos/public-snapshot/packages/detail/python/typeql-grammar/latest/a=noarch;xf=sdist;xn=typeql-grammar/",title="Latest version of 'typeql-grammar' @ Cloudsmith"]
<a href="https://cloudsmith.io/~typedb/repos/public-snapshot/packages/detail/python/typeql-grammar/latest/a=noarch;xf=sdist;xn=typeql-grammar/"><img src="https://api-prd.cloudsmith.io/v1/badges/version/typedb/public-snapshot/python/typeql-grammar/latest/a=noarch;xf=sdist;xn=typeql-grammar/?render=true&show_latest=true" alt="Latest version of 'typeql-grammar' @ Cloudsmith" /></a>

rendered as: Latest version of 'typeql-grammar' @ Cloudsmith

These instructions assume you have setup the repository first (or read it).

To install/use typeql-grammar @ version 0.0.0+ac36f755d38beeb76bfc8241d972e021bd911e50 ...

pip install 'typeql-grammar==0.0.0+ac36f755d38beeb76bfc8241d972e021bd911e50'

You can also install the latest version of this package:

pip install --upgrade 'typeql-grammar'

If necessary, you can specify the repository directly:

pip install \
  --index-url=https://repo.typedb.com/public/public-snapshot/python/simple/ \
  typeql-grammar==0.0.0+ac36f755d38beeb76bfc8241d972e021bd911e50

If you've got a project requirements.txt file, you can specify this as a dependency:

--index-url=https://repo.typedb.com/public/public-snapshot/python/simple/
typeql-grammar==0.0.0+ac36f755d38beeb76bfc8241d972e021bd911e50

In addition, you can use this repository as an extra index url. However, please read our documentation on this parameter before using it. For example in a requirements.txt file:

--extra-index-url=https://repo.typedb.com/public/public-snapshot/python/simple/
typeql-grammar==0.0.0+ac36f755d38beeb76bfc8241d972e021bd911e50
Warning: We highly recommend using pip (or similar) rather than installing directly.
Top