
GITHUB . COM {
}
Detected CMS Systems:
- Wordpress (2 occurrences)
Title:
orm_mode with PonyORM Β· Issue #2020 Β· pydantic/pydantic
Description:
Checks I added a descriptive title to this issue I have searched (google, github) for similar issues and couldn't find anything I have read and followed the docs and couldn't find an answer...
Website Age:
17 years and 8 months (reg. 2007-10-09).
Matching Content Categories {π}
- Technology & Computing
- Video & Online Content
- Dating & Relationships
Content Management System {π}
What CMS is github.com built with?
Github.com is based on WORDPRESS.
Traffic Estimate {π}
What is the average monthly size of github.com audience?
ππ Tremendous Traffic: 10M - 20M visitors per month
Based on our best estimate, this website will receive around 10,653,731 visitors per month in the current month.
check SE Ranking
check Ahrefs
check Similarweb
check Ubersuggest
check Semrush
How Does Github.com Make Money? {πΈ}
Subscription Packages {π³}
We've located a dedicated page on github.com that might include details about subscription plans or recurring payments. We identified it based on the word pricing in one of its internal links. Below, you'll find additional estimates for its monthly recurring revenues.How Much Does Github.com Make? {π°}
Subscription Packages {π³}
Prices on github.com are in US Dollars ($).
They range from $4.00/month to $21.00/month.
We estimate that the site has approximately 5,316,083 paying customers.
The estimated monthly recurring revenue (MRR) is $22,327,549.
The estimated annual recurring revenues (ARR) are $267,930,588.
Wordpress Themes and Plugins {π¨}
What WordPress theme does this site use?
It is strange but we were not able to detect any theme on the page.
What WordPress plugins does this website use?
It is strange but we were not able to detect any plugins on the page.
Keywords {π}
pydantic, class, issue, cschmatzler, sign, issues, ormmode, contents, type, pull, ponyorm, github, find, question, content, navigation, open, notifications, requests, actions, security, closed, added, searched, couldnt, docs, commit, python, import, version, database, work, recursive, orm, error, organization, list, classes, primarykeyuuid, defaultuuid, autotrue, uuid, config, true, layday, commented, terms, validator, projects, milestone,
Topics {βοΈ}
cache/pypoetry/virtualenvs/backend-wv529wjx-py3 '249941bf-fe64-430e-ae38-7731e60a9940' personal information orm_mode open issues recursive orm models recursive orm mode comment metadata assignees pydantic terms content set pull request database setup required pydantic version similar issues import pydantic auto=true pre=true allow_reuse=true added docs receive notifications class organizationcontent set[organizationcontent] class ormorganizationcontent class ormorganization type=type_error type ormorganizationcontentset type projects descriptive title person hit future implement /home/christoph/ 8/lib/python3 ['typing-extensions'] valid list simplest thing def pony_set_to_list return list great rest projects milestone milestone relationships organization = required issues default=uuid4 validator hint issue 1 validation error querying ormorganization id = primarykey contents = set assume contents
Payment Methods {π}
- Braintree
Questions {β}
- Already have an account?
- Pony's content set doesn't seem to work for the recursive ORM mode?
Schema {πΊοΈ}
DiscussionForumPosting:
context:https://schema.org
headline:orm_mode with PonyORM
articleBody:### Checks
* [x] I added a descriptive title to this issue
* [x] I have searched (google, github) for similar issues and couldn't find anything
* [x] I have read and followed [the docs](https://pydantic-docs.helpmanual.io/) and couldn't find an answer
* [x] After submitting this, I commit to one of:
* Look through open issues and helped at least one other person
* Hit the "watch" button on this repo to receive notifications and I commit to help at least 2 people that ask questions in the future
* Implement a Pull Request for a confirmed bug
<!-- Sorry to sound so draconian, but every second saved replying to issues is time spend improving pydantic :-) -->
# Question
Output of `python -c "import pydantic.utils; print(pydantic.utils.version_info())"`:
```
pydantic version: 1.6.1
pydantic compiled: False
install path: /home/christoph/.cache/pypoetry/virtualenvs/backend-WV529wjX-py3.8/lib/python3.8/site-packages/pydantic
python version: 3.8.3 (default, May 13 2020, 19:59:26) [GCC 9.2.0]
platform: Linux-5.4.67-x86_64-with-glibc2.2.5
optional deps. installed: ['typing-extensions']
...
```
<!-- or if you're using pydantic prior to v1.3, manually include: OS, python version and pydantic version -->
<!-- Please read the [docs](https://pydantic-docs.helpmanual.io/) and search through issues to
confirm your question hasn't already been answered. -->
<!-- Where possible please include a self-contained code snippet describing your question: -->
Unfortunately not self-contained because database setup required, but I hope my goal is obvious.
This should work as per [Recursive ORM Models](https://pydantic-docs.helpmanual.io/usage/models/#recursive-orm-models), but I am getting the following error:
```
pydantic.error_wrappers.ValidationError: 1 validation error for Organization
E contents
E value is not a valid list (type=type_error.list)
```
When querying ORMOrganization, `ORMOrganization.contents` is of type `ORMOrganizationContentSet([ORMOrganizationContent[UUID('249941bf-fe64-430e-ae38-7731e60a9940')]])`. Pony's content set doesn't seem to work for the recursive ORM mode? `iter(contents)` works, so I am not sure where to go from here.
Changing the type of `Organization.contents` to `Set[OrganizationContent]` does not change anything.
I searched the issues here for PonyORM and did not find anything. I would much appreciate any help regarding this!
```py
import pydantic
# Database classes:
class ORMOrganization(database.Entity):
id = PrimaryKey(UUID, default=uuid4, auto=True)
contents = Set('ORMOrganizationContent', reverse="organization")
class ORMOrganizationContent(database.Entity):
id = PrimaryKey(UUID, default=uuid4, auto=True)
organization = Required("ORMOrganization")
name = Required(str)
# Pydantic classes:
class OrganizationContent(pydantic.BaseModel):
id: UUID
name: str
class Config:
orm_mode = True
class Organization(pydantic.BaseModel):
id: UUID
contents: List[OrganizationContent]
class Config:
orm_mode = True
```
author:
url:https://github.com/cschmatzler
type:Person
name:cschmatzler
datePublished:2020-10-20T21:42:46.000Z
interactionStatistic:
type:InteractionCounter
interactionType:https://schema.org/CommentAction
userInteractionCount:2
url:https://github.com/2020/pydantic/issues/2020
context:https://schema.org
headline:orm_mode with PonyORM
articleBody:### Checks
* [x] I added a descriptive title to this issue
* [x] I have searched (google, github) for similar issues and couldn't find anything
* [x] I have read and followed [the docs](https://pydantic-docs.helpmanual.io/) and couldn't find an answer
* [x] After submitting this, I commit to one of:
* Look through open issues and helped at least one other person
* Hit the "watch" button on this repo to receive notifications and I commit to help at least 2 people that ask questions in the future
* Implement a Pull Request for a confirmed bug
<!-- Sorry to sound so draconian, but every second saved replying to issues is time spend improving pydantic :-) -->
# Question
Output of `python -c "import pydantic.utils; print(pydantic.utils.version_info())"`:
```
pydantic version: 1.6.1
pydantic compiled: False
install path: /home/christoph/.cache/pypoetry/virtualenvs/backend-WV529wjX-py3.8/lib/python3.8/site-packages/pydantic
python version: 3.8.3 (default, May 13 2020, 19:59:26) [GCC 9.2.0]
platform: Linux-5.4.67-x86_64-with-glibc2.2.5
optional deps. installed: ['typing-extensions']
...
```
<!-- or if you're using pydantic prior to v1.3, manually include: OS, python version and pydantic version -->
<!-- Please read the [docs](https://pydantic-docs.helpmanual.io/) and search through issues to
confirm your question hasn't already been answered. -->
<!-- Where possible please include a self-contained code snippet describing your question: -->
Unfortunately not self-contained because database setup required, but I hope my goal is obvious.
This should work as per [Recursive ORM Models](https://pydantic-docs.helpmanual.io/usage/models/#recursive-orm-models), but I am getting the following error:
```
pydantic.error_wrappers.ValidationError: 1 validation error for Organization
E contents
E value is not a valid list (type=type_error.list)
```
When querying ORMOrganization, `ORMOrganization.contents` is of type `ORMOrganizationContentSet([ORMOrganizationContent[UUID('249941bf-fe64-430e-ae38-7731e60a9940')]])`. Pony's content set doesn't seem to work for the recursive ORM mode? `iter(contents)` works, so I am not sure where to go from here.
Changing the type of `Organization.contents` to `Set[OrganizationContent]` does not change anything.
I searched the issues here for PonyORM and did not find anything. I would much appreciate any help regarding this!
```py
import pydantic
# Database classes:
class ORMOrganization(database.Entity):
id = PrimaryKey(UUID, default=uuid4, auto=True)
contents = Set('ORMOrganizationContent', reverse="organization")
class ORMOrganizationContent(database.Entity):
id = PrimaryKey(UUID, default=uuid4, auto=True)
organization = Required("ORMOrganization")
name = Required(str)
# Pydantic classes:
class OrganizationContent(pydantic.BaseModel):
id: UUID
name: str
class Config:
orm_mode = True
class Organization(pydantic.BaseModel):
id: UUID
contents: List[OrganizationContent]
class Config:
orm_mode = True
```
author:
url:https://github.com/cschmatzler
type:Person
name:cschmatzler
datePublished:2020-10-20T21:42:46.000Z
interactionStatistic:
type:InteractionCounter
interactionType:https://schema.org/CommentAction
userInteractionCount:2
url:https://github.com/2020/pydantic/issues/2020
Person:
url:https://github.com/cschmatzler
name:cschmatzler
url:https://github.com/cschmatzler
name:cschmatzler
InteractionCounter:
interactionType:https://schema.org/CommentAction
userInteractionCount:2
interactionType:https://schema.org/CommentAction
userInteractionCount:2
External Links {π}(4)
Analytics and Tracking {π}
- Site Verification - Google
Libraries {π}
- Clipboard.js
- D3.js
- Lodash
Emails and Hosting {βοΈ}
Mail Servers:
- aspmx.l.google.com
- alt1.aspmx.l.google.com
- alt2.aspmx.l.google.com
- alt3.aspmx.l.google.com
- alt4.aspmx.l.google.com
Name Servers:
- dns1.p08.nsone.net
- dns2.p08.nsone.net
- dns3.p08.nsone.net
- dns4.p08.nsone.net
- ns-1283.awsdns-32.org
- ns-1707.awsdns-21.co.uk
- ns-421.awsdns-52.com
- ns-520.awsdns-01.net