Files
Anton_wireframe/app/routers/__pycache__/investors.cpython-312.pyc
T

204 lines
21 KiB
Plaintext
Raw Normal View History

Ë
YAæhOãóRddlmZddlmZddlmZmZmZddlm Z m
Z
m Z m Z ddl
mZddlmZmZmZmZmZmZddlmZmZe dg¬ «ZGd
d e«ZGd d
e«Zej9dee¬«e ddd¬«e dddd¬«e
e«fdededefd«Zej9dee¬«e dd¬«e dd¬«e dd ¬«e dd!¬«e dd"¬«e dd#¬«e dd$¬«e ddd¬«e dddd¬«e
e«f
d%eed&eed'eed(eed)eed*eed+eedededefd,„«Z ej9d-e¬«e
e«fd.edefd/„«Z!ejEde¬«e
e«fd0edefd1„«Z#ejId-e¬«e
e«fd.ed0edefd2„«Z%ejMd-«e
e«fd.edefd3„«Z'ej9d4ee¬«e dd5¬«e ddd¬«e dddd¬«e
e«fd.ed6edededef
d7„«Z(y)8é)ÚOptional)Úget_db)Ú FundTableÚ
InvestorTableÚ SectorTable)Ú APIRouterÚDependsÚ
HTTPExceptionÚQuery)Ú BaseModel)ÚCompanyMinimalÚInvestmentResponseÚInvestmentStageÚ InvestorDataÚPaginatedResponseÚ
SectorMinimal)ÚSessionÚ selectinloadzInvestor Routes)ÚtagscóŠeZdZUeed<dZeeed<dZeeed<dZeeed<e ed<e ed<e ed<eed <d
Z
e ed <y) ÚInvestorCreateÚnameNÚ descriptionÚwebsiteÚ headquartersÚaumÚcheck_size_lowerÚcheck_size_upperÚgeographic_focusrÚnumber_of_investments) Ú__name__Ú
__module__Ú __qualname__ÚstrÚ__annotations__rrrrÚintr ©óúL/home/oluwasanmi/Documents/Work/MKD/anton_wireframe/app/routers/investors.pyrrsSØ
ƒIØ!%€K˜#‘Ó!€GˆXc‰]Ó!Ø"&€L(˜3 ƒHØÓØÓØÓØ!"И"r(rcóÂeZdZUdZeeed<dZeeed<dZeeed<dZ eeed<dZ
ee ed<dZ ee ed<dZ
ee ed<dZeeed <dZee ed
<y) ÚInvestorUpdateNrrrrrrrrr )r!r"r#rrr$r%rrrrr&rrrr r'r(r)r+r+!s„Ø€Dˆ(3‰-ÓØ!%€K˜#‘Ó!€GˆXc‰]Ó!Ø"&€L(˜3€Cˆ#‰ÓØ&*Ðh˜s*Ø&*Ðh˜s*Ø&*Ðh˜s*Ø+/И8 C™=Ô/r(r+z
/investors)Úresponse_modelézPage number (starts at 1))Úgeré
édzItems per page (max 100))r.ÚlerÚpageÚ page_sizeÚdbcóˆ|dz
|z}|jt«j«}|jt«jt tj
«t tj «t tj«t tj««j|«j|«j«}g}|D}|j
ddDcgc]#}t|j|j¬«Œ%} }|jr(|jD]}
|
jr3dj!|
jD cgc]} | jŒc} «nd} |
jr|
jddngD
cgc]#}
t#|
j|
j¬«Œ%}}
t%|j|
j&r|jd|
j&n |j|j(|
j*|
j,|
j.| | |d¬«
}|j1|«ŒŒtt%|j|j|j(dddd| gd¬«
}|j1|«Œº||zdz
|z}t3|||||¬ «Scc}wcc} wcc}
w)
zÁGet all investors with their funds as separate entries (paginated)
Each investor-fund combination is returned as a separate row.
An investor with 3 funds will appear as 3 entries.
r-©Úidrú, ú - çð?©
r8rrrrrÚ stage_focusÚportfolio_companiesÚsectorsÚcompatibility_score©ÚitemsÚtotalr2r3Ú total_pages)ÚqueryrÚcountÚoptionsrr>Ú team_membersr?ÚfundsÚoffsetÚlimitÚallr
r8rÚinvestment_stagesÚjoinrrÚ fund_namerrrrÚappendr)r2r3r4rJÚ total_countÚ investorsÚinvestment_responsesÚinvestorÚcompanyr>ÚfundÚstager=ÚsectorÚ fund_sectorsÚinvestment_responserDs r)Úread_investorsr[-sðQ‰h˜)Ñ
#€Fð—(‘(œ=Ó1€Kð Óß Ü œ× œ× œ× œ× 
÷
ß ˆyÓ ß ððÐØó4ð¸Ð
àô
˜gŸj™j¨w¯|©|Ö 
Ðð
ð > Ÿó
Að×—I‘I°t×7MÑ7MÖN¨e˜uŸzðð8<·|²| 4§<¡<°°Ñ#3Èö àô" V§Y¡Y°V·[±[Ö  ð ô
'9Ø—{—~%ŸM™M˜?¨#¨d¯n©nÐ-=ÑØ Ÿ Ø%)×%:Ñ%:Ø%)×%:Ñ%:Ø%)×%:Ñ%:Ø +Ø(;Ø(Ø(+ô
'Ð%×+Ð,?Ö@ò9
Aô>#5Ø—;—]—L‘LØ!%Ø!%Ø!%Ø Ø$7ØØ$'ô #Ð ð
!× 'Ð(;Ö <ði4=ðn Ñ*¨QÑ.°9Ñ<€Kä ØØ
ØØô  ðùòo
ùòOùò  sÃ4(J5Å J: Æ(J?z/investors/filterNzFilter by investment stage)rzMinimum check sizezMaximum check sizez Geographic focus (partial match)zSector name (partial match)z Minimum AUMz Maximum AUMrWÚmin_check_sizeÚmax_check_sizeÚ geographyrXÚmin_aumÚmax_aumc
ó6| jt«jttj«jt
j «ttj«jt
j«ttj«jt
j«ttj«ttj««}
|"|
jtj|k\«}
|"|
jtj|k«}
|r2|
jtjjd|d««}
|?|
jtj«jt
j |k\«}
|C||
jtj«}
|
jt
j |k«}
|rO|
jtj«jt"j$jd|d««}
|
j'«} |dz
|z} |
j)| «j+|«j-«}
g}|
D]]}|j}|j ddDcgc]#}t/|j0|j$¬«Œ%}}|jr3dj|jDcgc]}|j$Œc}«nd}|jr|jddngDcgc]#}t3|j0|j$¬«Œ%}}t5|j0|j6r|j$d|j6n |j$|j |j|j|j|||d¬ «
}|j9|«Œ`| |zdz
|z}t;|| |||¬
«Scc}wcc}wcc}w) z©Filter investors based on various criteria (paginated)
Returns investor-fund combinations as separate rows.
Queries the funds table to find matching funds.
%r-r6r7r9r:r;r<rA)rErrGrrTrr>rHr?rMÚfilterrrrÚilikerNrrrrFrJrKrLr
r8rrrOrPr)rWr\r]r^rXr_r`r2r3r4rErQrJrIrSrVrTrUr>r=rYrZrDs r)Úfilter_investorsresð0
H‰H”YÓ × ”Y×(× × 
ô ”Y×(×5´m×6PÑ6PÓ”Y×(×5´m×6KÑ6KÓ”Y×”Y×
€EðÐ œY×7¸>ÑàÐ œY×7¸>ÑáØ œY×À)ÀÈAÐ>NÓðÐØ
œ9×.×5´m×6GÑ6GÈ7Ñ6RÓàÐØ ˆ?Ø—J‘Jœy×2ˆEØ œ]×.°'Ñ:ˆñØ
œ9× × Ñ × " Q v h¨a  
ˆð
—+‘+“-€KðQ‰h˜)Ñ
#€FØ L‰L˜Ó × &  1× 7€EðÐØó$Ø—=‘=ˆð
¸Ð
àô
˜gŸj™j¨w¯|©|Ö 
Ðð
ð×
I‰I¨t×/EÑ/EÖF eu—z“zÒ ð ð04¯|ª|˜4Ÿ<™<¨¨Ñö
àô
˜VŸY™Y¨V¯[©[Ö 
ˆ ð
ô
{‰{à~Š~ð—MM? # d§n¡nÐ%5ÑØ Ø#Ø 3Ø Ø #ô

Ðð ×#Ð$7Ö8ðI$9ðN Ñ*¨QÑ.°9Ñ<€Kä ØØ
ØØô  ðùòK
ùòGùò 
sÊ1(P ÌP
Ì;(Pz/investors/{investor_id}Ú investor_idcóò|jt«jttj«ttj
«ttj «ttj««jtj|k(«j«}|s
tdd¬«t||j|j
|j |j¬«S)z2Get a specific investor by ID with all their fundsé”úInvestor not found©Ú status_codeÚdetail©rTr>rHr?rI)
rErrGrr>rHr?rIrcr8Úfirstr
r)rfr4rTs r)Ú
read_investorroð Óß Ü œ× œ× œ× œ× 
÷

× Ñ  KÑ/Ó 0ß ð
ñ ܨÐ4HÔ ØØ×× Ñ Øn‰nô  ðr(rTcó~tdi|j«¤Ž}|j|«|j«|j |«|j t«j
ttj«ttj«ttj«ttj««jtj|jk(«j«}t||j|j|j|j¬«S)zCreate a new investorrmr')rÚdictÚaddÚcommitÚrefreshrErGrr>rHr?rIrcr8rnr)rTr4Ú db_investorÚinvestor_with_relationss r)Úcreate_investorrw"ô Ñ2 (§-¡-£/Ñ2€K؇FFˆ;ÔØ‡II„K؇JJˆ{Ôð Óß Ü œ× œ× œ× œ× 
÷

× Ñ  K§N¡NÑ2Ó 3ß ðô Ø,×'×%×  ðr(có(|jt«jtj|k(«j «}|s
t dd¬«|j
d¬«}|j«D]\}}t|||«Œ|j«|j|«|jt«jttj«ttj«ttj«ttj ««jtj|k(«j «}t#||j|j|j|j ¬«S)zUpdate an existing investorrhrirjT)Ú
exclude_unsetrm)rErrcr8rnr
rqrBÚsetattrrsrtrGrr>rHr?rIr)rfrTr4ruÚ update_dataÚfieldÚvaluervs r)Úupdate_investorr~As?ð Ó×&¤}×'7Ñ'7¸;Ñ'FÓG×ñ ܨÐ4HÔ—-‘-¨d3€KØ+‰ ˆˆuÜ ˜U EÕ‡II„K؇JJˆ{Ôð Óß Ü œ× œ× œ× œ× 
÷

× Ñ  KÑ/Ó 0ß ðô Ø,×'×%×  ðr(cóð|jt«jtj|k(«j «}|s
t dd¬«|j
|«|j«ddiS)zDelete an investorrhrirjÚmessagezInvestor deleted successfully)rErrcr8rnr
Údeleters)rfr4rus r)Údelete_investorrjshð Ó×&¤}×'7Ñ'7¸;Ñ'FÓG×ñ ܨÐ4HÔ‡IIˆkÔØ‡II„KØ Ð 7r(z /investors/{investor_id}/similarz-Maximum number of similar investors to returnrKc
óŠ|jt«jttj«ttj
«ttj «ttj«jtj«ttj«jtj ««jtj|k(«j«}|s
tdd¬«t«}t«}g}g} |jD}
|
j r3|j|
j D chc]} | jŒc} «|
jr3|j|
jD chc]} | jŒc} «|
j r3|
j"r'|j%|
j |
j"f«|
j&sŒÍ| j%|
j&j)««Œ÷|jt«jttj*«jtj«ttj*«jtj
«ttj*«jtj «ttj«ttj ««j-tj*«jtj|k7«j/«}
g}|
D]`}
d}|
j&r>| r<|
j&j)«}| D]}||k(r|dz
}n||vs||vsŒ|dz
}n|
j r|
j"rs|rqd}|D]e\}}t1|
j |«}t3|
j"|«}||kDsŒ8||z
}||z
}|dkDr||z nd}t1|t5d|z««}Œg||z
}|
j*j6r|j6rvt9|
j*j6|j6z
«}t1|
j*j6|j6«}|dkDrd||z z
nd}|t5d|z«z
}|
j r^|r\|
j D chc]} | jŒ}} |j;|«}t=|«t=|«z }|t5d |z«z
}|
jr^|r\|
jD chc]} | jŒ}} |j;|«} t=| «t=|«z }|t5d|z«z
}|dkDsŒN|j%||
f«Œc|j?d