python-web.scm 227 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
  3. ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
  4. ;;; Copyright © 2017 Christopher Baines <mail@cbaines.net>
  5. ;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym+a@scratchpost.org>
  6. ;;; Copyright © 2013, 2014, 2015, 2016, 2020 Andreas Enge <andreas@enge.fr>
  7. ;;; Copyright © 2016, 2017, 2019-2022 Marius Bakke <marius@gnu.org>
  8. ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
  9. ;;; Copyright © 2017, 2021 Roel Janssen <roel@gnu.org>
  10. ;;; Copyright © 2016, 2017, 2020 Julien Lepiller <julien@lepiller.eu>
  11. ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
  12. ;;; Copyright © 2014, 2017, 2021 Eric Bavier <bavier@posteo.net>
  13. ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
  14. ;;; Copyright © 2015 Cyril Roelandt <tipecaml@gmail.com>
  15. ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
  16. ;;; Copyright © 2016, 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
  17. ;;; Copyright © 2016–2021 Tobias Geerinckx-Rice <me@tobias.gr>
  18. ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
  19. ;;; Copyright © 2015, 2016 Christine Lemmer-Webber <cwebber@dustycloud.org>
  20. ;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
  21. ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
  22. ;;; Copyright © 2016 David Craven <david@craven.ch>
  23. ;;; Copyright © 2017 Oleg Pykhalov <go.wigust@gmail.com>
  24. ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
  25. ;;; Copyright © 2017 Mark Meyer <mark@ofosos.org>
  26. ;;; Copyright © 2018 Tomáš Čech <sleep_walker@gnu.org>
  27. ;;; Copyright © 2018, 2019, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
  28. ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
  29. ;;; Copyright © 2018, 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  30. ;;; Copyright © 2019 Vagrant Cascadian <vagrant@debian.org>
  31. ;;; Copyright © 2019 Brendan Tildesley <mail@brendan.scot>
  32. ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
  33. ;;; Copyright © 2019, 2020 Tanguy Le Carrour <tanguy@bioneland.org>
  34. ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
  35. ;;; Copyright © 2020 Evan Straw <evan.straw99@gmail.com>
  36. ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
  37. ;;; Copyright © 2020 Holger Peters <holger.peters@posteo.de>
  38. ;;; Copyright © 2020 Noisytoot <noisytoot@gmail.com>
  39. ;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
  40. ;;; Copyright © 2020, 2021, 2022 Vinicius Monego <monego@posteo.net>
  41. ;;; Copyright © 2020 Konrad Hinsen <konrad.hinsen@fastmail.net>
  42. ;;; Copyright © 2020, 2022 Giacomo Leidi <goodoldpaul@autistici.org>
  43. ;;; Copyright © 2021 Ekaitz Zarraga <ekaitz@elenq.tech>
  44. ;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
  45. ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
  46. ;;; Copyright © 2021 Pradana Aumars <paumars@courrier.dev>
  47. ;;; Copyright © 2021 Arun Isaac <arunisaac@systemreboot.net>
  48. ;;; Copyright © 2021 jgart <jgart@dismail.de>
  49. ;;; Copyright © 2021 Alice Brenon <alice.brenon@ens-lyon.fr>
  50. ;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
  51. ;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
  52. ;;;
  53. ;;; This file is part of GNU Guix.
  54. ;;;
  55. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  56. ;;; under the terms of the GNU General Public License as published by
  57. ;;; the Free Software Foundation; either version 3 of the License, or (at
  58. ;;; your option) any later version.
  59. ;;;
  60. ;;; GNU Guix is distributed in the hope that it will be useful, but
  61. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  62. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  63. ;;; GNU General Public License for more details.
  64. ;;;
  65. ;;; You should have received a copy of the GNU General Public License
  66. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  67. (define-module (gnu packages python-web)
  68. #:use-module (guix packages)
  69. #:use-module (guix download)
  70. #:use-module (guix git-download)
  71. #:use-module (guix build-system python)
  72. #:use-module (guix gexp)
  73. #:use-module (guix utils)
  74. #:use-module (gnu packages)
  75. #:use-module (gnu packages base)
  76. #:use-module (gnu packages check)
  77. #:use-module (gnu packages compression)
  78. #:use-module (gnu packages curl)
  79. #:use-module (gnu packages databases)
  80. #:use-module (gnu packages django)
  81. #:use-module (gnu packages graphviz)
  82. #:use-module (gnu packages groff)
  83. #:use-module (gnu packages libevent)
  84. #:use-module (gnu packages libffi)
  85. #:use-module (gnu packages node)
  86. #:use-module (gnu packages pcre)
  87. #:use-module (gnu packages pkg-config)
  88. #:use-module (gnu packages python)
  89. #:use-module (gnu packages python-build)
  90. #:use-module (gnu packages python-check)
  91. #:use-module (gnu packages python-crypto)
  92. #:use-module (gnu packages python-science)
  93. #:use-module (gnu packages python-xyz)
  94. #:use-module (gnu packages qt)
  95. #:use-module (gnu packages serialization)
  96. #:use-module (gnu packages sphinx)
  97. #:use-module (gnu packages texinfo)
  98. #:use-module (gnu packages tls)
  99. #:use-module (gnu packages time)
  100. #:use-module (gnu packages web)
  101. #:use-module (gnu packages xml)
  102. #:use-module ((guix licenses) #:prefix license:)
  103. #:use-module (srfi srfi-1))
  104. (define-public python-prawcore
  105. (package
  106. (name "python-prawcore")
  107. (version "2.3.0")
  108. (source
  109. (origin
  110. (method url-fetch)
  111. (uri (pypi-uri "prawcore" version))
  112. (sha256
  113. (base32 "0vgmhjddqxnz5vy70dyqvakak51fg1nk6j3xavkc83d8nzacrwfs"))))
  114. (build-system python-build-system)
  115. (native-inputs
  116. (list python-betamax
  117. python-betamax-matchers
  118. python-betamax-serializers
  119. python-mock
  120. python-pytest
  121. python-testfixtures))
  122. (propagated-inputs
  123. (list python-requests))
  124. (synopsis "Core component of PRAW")
  125. (description "PRAWcore is a low-level communication layer used by PRAW.")
  126. (home-page "https://praw.readthedocs.io/en/latest/")
  127. (license license:bsd-2)))
  128. (define-public python-praw
  129. (package
  130. (name "python-praw")
  131. (version "7.5.0")
  132. (source
  133. (origin
  134. (method url-fetch)
  135. (uri (pypi-uri "praw" version))
  136. (sha256
  137. (base32 "1nqcwz8r8xp4rfpy2i11x2fjga8fmmf6zw94xjk1h1yxgn1gq6zr"))))
  138. (build-system python-build-system)
  139. (arguments
  140. `(#:phases
  141. (modify-phases %standard-phases
  142. (add-after 'unpack 'disable-failing-tests
  143. (lambda _
  144. (with-directory-excursion "tests"
  145. ;; Integration tests depend on files that are not included.
  146. (for-each delete-file-recursively
  147. '("integration/models" "unit/models"))
  148. ;; The configuration file does not seem to exist.
  149. (delete-file "unit/test_config.py"))))
  150. (replace 'check
  151. (lambda* (#:key tests? #:allow-other-keys)
  152. (when tests?
  153. (invoke "pytest" "-k"
  154. ;; These tests depend on test files that don't exist.
  155. (string-append "not test_bad_request_without_json_text_plain_response"
  156. " and not test_bad_request_without_json_text_html_response"))))))))
  157. (native-inputs
  158. (list python-betamax python-betamax-matchers python-pytest))
  159. (propagated-inputs
  160. (list python-prawcore python-update-checker python-websocket-client))
  161. (synopsis "Python Reddit API Wrapper")
  162. (description "PRAW is a Python package that allows for simple access to
  163. Reddit’s API. It aims to be easy to use and internally follows all of Reddit’s
  164. API rules.")
  165. (home-page "https://praw.readthedocs.io/en/latest/")
  166. (license license:bsd-2)))
  167. (define-public python-frozenlist
  168. (package
  169. (name "python-frozenlist")
  170. (version "1.2.0")
  171. (source
  172. (origin
  173. (method url-fetch)
  174. (uri (pypi-uri "frozenlist" version))
  175. (sha256
  176. (base32 "1pkr23by7pk9lsmsh0wiqirpkq3f1f08b0615nbzysn51bk1n838"))))
  177. (build-system python-build-system)
  178. (arguments
  179. '(#:phases
  180. (modify-phases %standard-phases
  181. (replace 'check
  182. (lambda* (#:key tests? #:allow-other-keys)
  183. (when tests?
  184. (invoke "pytest" "tests")))))))
  185. (native-inputs (list python-pytest))
  186. (home-page "https://github.com/aio-libs/frozenlist")
  187. (synopsis "List-like data structure for Python")
  188. (description "@code{frozenlist.FrozenList} is a list-like structure which
  189. implements @code{collections.abc.MutableSequence}. It can be made immutable
  190. by calling @code{FrozenList.freeze}.")
  191. (license license:asl2.0)))
  192. (define-public python-aiosignal
  193. (package
  194. (name "python-aiosignal")
  195. (version "1.2.0")
  196. (source
  197. (origin
  198. (method url-fetch)
  199. (uri (pypi-uri "aiosignal" version))
  200. (sha256
  201. (base32 "1wkxbdgw07ay8yzx3pg1jcm46p3d21rfb5g4k17ysz3vdkdngvbq"))))
  202. (build-system python-build-system)
  203. (arguments
  204. '(#:phases
  205. (modify-phases %standard-phases
  206. (replace 'check
  207. (lambda* (#:key tests? #:allow-other-keys)
  208. (when tests?
  209. (invoke "pytest" "tests")))))))
  210. (propagated-inputs (list python-frozenlist))
  211. (native-inputs (list python-pytest python-pytest-asyncio))
  212. (home-page "https://github.com/aio-libs/aiosignal")
  213. (synopsis "Callback manager for Python @code{asyncio} projects")
  214. (description "This Python module provides @code{Signal}, an abstraction to
  215. register asynchronous callbacks. The @code{Signal} abstraction can be used
  216. for adding, removing and dropping callbacks.")
  217. (license license:asl2.0)))
  218. (define-public python-aiohttp
  219. (package
  220. (name "python-aiohttp")
  221. (version "3.8.1")
  222. (source
  223. (origin
  224. (method url-fetch)
  225. (uri (pypi-uri "aiohttp" version))
  226. (sha256
  227. (base32 "0y3m1dzl4h6frg8vys0fc3m83ijd1plfpihv3kvmxqadlphp2m7w"))
  228. ;; TODO: Unbundle the llhttp sources.
  229. ;; (modules '((guix build utils)))
  230. ;; (snippet
  231. ;; '((delete-file-recursively "vendor")))
  232. ))
  233. (build-system python-build-system)
  234. (arguments
  235. '(#:phases
  236. (modify-phases %standard-phases
  237. (add-after 'unpack 'fix-tests
  238. (lambda _
  239. ;; disable brotli tests, because we’re not providing that optional library
  240. (substitute* "tests/test_http_parser.py"
  241. ((" async def test_feed_eof_no_err_brotli")
  242. " @pytest.mark.xfail\n async def test_feed_eof_no_err_brotli"))
  243. ;; make sure the timestamp of this file is > 1990, because a few
  244. ;; tests like test_static_file_if_modified_since_past_date depend on it
  245. (let ((late-90s (* 60 60 24 365 30)))
  246. (utime "tests/data.unknown_mime_type" late-90s late-90s))
  247. ;; Disable test that attempts to access httpbin.org.
  248. (substitute* "tests/test_formdata.py"
  249. (("async def test_mark_formdata_as_processed.*" all)
  250. (string-append "@pytest.mark.xfail\n" all)))
  251. ;; Don't test the aiohttp pytest plugin to avoid a dependency loop.
  252. (delete-file "tests/test_pytest_plugin.py")))
  253. (add-before 'build 'cythonize
  254. (lambda _
  255. ;; Adapted from the Makefile.
  256. (with-directory-excursion "aiohttp"
  257. (for-each
  258. (lambda (file)
  259. (invoke "cython" "-3"
  260. file "-I" "."))
  261. (find-files "." "_.*\\.pyx$")))))
  262. (replace 'check
  263. (lambda* (#:key tests? #:allow-other-keys)
  264. (let ((skipped-tests
  265. (string-append
  266. ;; This test probably requires to be run with the
  267. ;; library loaded from the the build directory.
  268. "not test_c_parser_loaded and "
  269. ;; Disable the following tests as they require
  270. ;; networking.
  271. "not TestDeflateBuffer and "
  272. "not test_client_session_timeout_zero and "
  273. "not test_empty_body and "
  274. "not test_mark_formdata_as_processed[pyloop] and "
  275. "not test_receive_runtime_err[pyloop]")))
  276. (when tests?
  277. ;; This tests requires the 'proxy.py' module, not yet
  278. ;; packaged.
  279. (delete-file "tests/test_proxy_functional.py")
  280. ;; Sometimes tests fail when run in parallel.
  281. (or
  282. (invoke "pytest" "-vv"
  283. ;; Disable loading the aiohttp coverage plugin
  284. ;; to avoid a circular dependency (code coverage
  285. ;; is not very interesting to us anyway).
  286. "-o" "addopts=''" "--ignore=aiohttp"
  287. "-n" (number->string (parallel-job-count))
  288. "-k" skipped-tests)
  289. (invoke "pytest" "-vv"
  290. "-o" "addopts=''" "--ignore=aiohttp"
  291. "-k" skipped-tests)))))))))
  292. (propagated-inputs
  293. (list python-aiodns
  294. python-aiosignal
  295. python-attrs
  296. python-async-timeout
  297. python-charset-normalizer
  298. python-frozenlist
  299. python-idna-ssl
  300. python-multidict
  301. python-typing-extensions
  302. python-yarl))
  303. (native-inputs
  304. (list gunicorn-bootstrap
  305. python-async-generator
  306. python-cython
  307. python-freezegun
  308. python-pytest
  309. python-pytest-mock
  310. python-pytest-xdist
  311. python-re-assert))
  312. (home-page "https://github.com/aio-libs/aiohttp/")
  313. (synopsis "Async HTTP client/server framework (asyncio)")
  314. (description "@code{aiohttp} is an asynchronous HTTP client/server
  315. framework.
  316. Its main features are:
  317. @itemize
  318. @item Supports both client and server side of HTTP protocol.
  319. @item Supports both client and server Web-Sockets out-of-the-box without the
  320. Callback Hell.
  321. @item Web-server has middlewares and pluggable routing.
  322. @end itemize")
  323. (license license:asl2.0)))
  324. (define-public python-aiohttp-socks
  325. (package
  326. (name "python-aiohttp-socks")
  327. (version "0.6.0")
  328. (source
  329. (origin
  330. (method url-fetch)
  331. (uri (pypi-uri "aiohttp_socks" version))
  332. (sha256
  333. (base32
  334. "04w010bvi719ifpc3sshav95k10hf9nq8czn9yglkj206yxcypdr"))))
  335. (build-system python-build-system)
  336. (propagated-inputs
  337. (list python-aiohttp python-attrs python-socks))
  338. (home-page "https://github.com/romis2012/aiohttp-socks")
  339. (synopsis "SOCKS proxy connector for aiohttp")
  340. (description "This package provides a SOCKS proxy connector for
  341. aiohttp. It supports SOCKS4(a) and SOCKS5.")
  342. (license license:asl2.0)))
  343. (define-public python-aiodns
  344. (package
  345. (name "python-aiodns")
  346. (version "1.1.1")
  347. (source
  348. (origin
  349. (method url-fetch)
  350. (uri (pypi-uri "aiodns" version))
  351. (sha256
  352. (base32
  353. "1snr5paql8dgvc676n8xq460wypjsb1xj53cf3px1s4wczf7lryq"))))
  354. (build-system python-build-system)
  355. (propagated-inputs
  356. (list python-pycares))
  357. (arguments
  358. `(#:tests? #f)) ;tests require internet access
  359. (home-page "https://github.com/saghul/aiodns")
  360. (synopsis "Simple DNS resolver for asyncio")
  361. (description "@code{aiodns} provides a simple way for doing
  362. asynchronous DNS resolutions with a synchronous looking interface by
  363. using @url{https://github.com/saghul/pycares,pycares}.")
  364. (license license:expat)))
  365. (define-public python-aiorpcx
  366. (package
  367. (name "python-aiorpcx")
  368. (version "0.22.1")
  369. (source
  370. (origin
  371. (method url-fetch)
  372. (uri (pypi-uri "aiorpcX" version))
  373. (sha256
  374. (base32
  375. "0lx54bcinp44fmr8q4bbffsqbkg8kdcwykf9i5jj0bj3sfzgf9k0"))))
  376. (build-system python-build-system)
  377. (propagated-inputs
  378. (list python-attrs))
  379. (home-page "https://github.com/kyuupichan/aiorpcX")
  380. (synopsis "Generic asyncio RPC implementation")
  381. (description
  382. "The aiorpcX library is a generic asyncio implementation of RPC suitable
  383. for an application that is a client, server or both.
  384. The package includes a module with full coverage of JSON RPC versions 1.0 and
  385. 2.0, JSON RPC protocol auto-detection, and arbitrary message framing. It also
  386. comes with a SOCKS proxy client.")
  387. (license (list license:expat license:bsd-2))))
  388. (define-public python-aiorpcx-0.18
  389. (package
  390. (inherit python-aiorpcx)
  391. (version "0.18.7")
  392. (source
  393. (origin
  394. (method url-fetch)
  395. (uri (pypi-uri "aiorpcX" version))
  396. (sha256
  397. (base32
  398. "1rswrspv27x33xa5bnhrkjqzhv0sknv5kd7pl1vidw9d2z4rx2l0"))))))
  399. (define-public python-asgiref
  400. (package
  401. (name "python-asgiref")
  402. (version "3.4.1")
  403. (source (origin
  404. (method url-fetch)
  405. (uri (pypi-uri "asgiref" version))
  406. (sha256
  407. (base32 "1saqgpgbdvb8awzm0f0640j0im55hkrfzvcw683cgqw4ni3apwaf"))))
  408. (build-system python-build-system)
  409. (arguments
  410. '(#:phases
  411. (modify-phases %standard-phases
  412. (replace 'check
  413. (lambda* (#:key tests? #:allow-other-keys)
  414. (when tests?
  415. (invoke "pytest" "-vv")))))))
  416. (native-inputs
  417. (list python-pytest python-pytest-asyncio))
  418. (home-page "https://github.com/django/asgiref/")
  419. (synopsis "ASGI specs, helper code, and adapters")
  420. (description
  421. "ASGI is a standard for Python asynchronous web apps and servers to
  422. communicate with each other, and positioned as an asynchronous successor to
  423. WSGI. This package includes libraries for implementing ASGI servers.")
  424. (license license:bsd-3)))
  425. (define-public python-css-html-js-minify
  426. (package
  427. (name "python-css-html-js-minify")
  428. (version "2.5.5")
  429. (source (origin
  430. (method url-fetch)
  431. (uri (pypi-uri "css-html-js-minify" version ".zip"))
  432. (sha256
  433. (base32
  434. "0v3l2dqdk2y4r6ax259gs4ij1zzm9yxg6491s6254vs9w3vi37sa"))))
  435. (build-system python-build-system)
  436. ;; XXX: The git repository has no tags, and the PyPI releases do not
  437. ;; contain tests.
  438. (arguments '(#:tests? #f))
  439. (native-inputs (list unzip))
  440. (home-page "https://github.com/juancarlospaco/css-html-js-minify")
  441. (synopsis "CSS/HTML/JS minifier")
  442. (description
  443. "This package provides a single-file minifier for CSS, HTML, and JavaScript.")
  444. ;; XXX: The README just says "GNU GPL and GNU LGPL and MIT". From
  445. ;; <https://github.com/juancarlospaco/css-html-js-minify/issues/9> it
  446. ;; looks like the user can choose a license.
  447. (license (list license:gpl3+ license:lgpl3+ license:expat))))
  448. (define-public python-aws-sam-translator
  449. (package
  450. (name "python-aws-sam-translator")
  451. (version "1.40.0")
  452. (source (origin
  453. (method url-fetch)
  454. (uri (pypi-uri "aws-sam-translator" version))
  455. (sha256
  456. (base32
  457. "1hq5ggbzcq4k3ks439hki493w4sasgaxns6j5x57xsj822acalmf"))))
  458. (build-system python-build-system)
  459. (arguments
  460. `(;; XXX: Tests are not distributed with the PyPI archive, and would
  461. ;; introduce a circular dependency on python-cfn-lint.
  462. #:tests? #f
  463. #:phases (modify-phases %standard-phases
  464. (add-after 'unpack 'loosen-requirements
  465. (lambda _
  466. ;; The package needlessly specifies exact versions
  467. ;; of dependencies, when it works fine with others.
  468. (substitute* "requirements/base.txt"
  469. (("(.*)(~=[0-9\\.]+)" all package version)
  470. package)))))))
  471. (propagated-inputs
  472. (list python-boto3 python-jsonschema python-six))
  473. (home-page "https://github.com/aws/serverless-application-model")
  474. (synopsis "Transform AWS SAM templates into AWS CloudFormation templates")
  475. (description
  476. "AWS SAM Translator is a library that transform @dfn{Serverless Application
  477. Model} (SAM) templates into AWS CloudFormation templates.")
  478. (license license:asl2.0)))
  479. (define-public python-aws-xray-sdk
  480. (package
  481. (name "python-aws-xray-sdk")
  482. (version "2.6.0")
  483. (home-page "https://github.com/aws/aws-xray-sdk-python")
  484. (source (origin
  485. (method git-fetch)
  486. (uri (git-reference (url home-page) (commit version)))
  487. (file-name (git-file-name name version))
  488. (sha256
  489. (base32
  490. "12fzr0ylpa1lx3xr1x2f1jx8iiyzcr6g57fb9jign0j0lxdlbzpv"))))
  491. (build-system python-build-system)
  492. (arguments
  493. `(#:phases (modify-phases %standard-phases
  494. (add-after 'unpack 'disable-tests
  495. (lambda _
  496. (for-each delete-file
  497. '(;; These tests require packages not yet in Guix.
  498. "tests/ext/aiobotocore/test_aiobotocore.py"
  499. "tests/ext/aiohttp/test_middleware.py"
  500. "tests/ext/pg8000/test_pg8000.py"
  501. "tests/ext/psycopg2/test_psycopg2.py"
  502. "tests/ext/pymysql/test_pymysql.py"
  503. "tests/ext/pynamodb/test_pynamodb.py"
  504. "tests/test_async_recorder.py"
  505. ;; FIXME: Why is this failing?
  506. "tests/test_patcher.py"
  507. ;; TODO: How to configure Django for these tests.
  508. "tests/ext/django/test_db.py"
  509. "tests/ext/django/test_middleware.py"
  510. ;; These tests want to access httpbin.org.
  511. "tests/ext/requests/test_requests.py"
  512. "tests/ext/httplib/test_httplib.py"
  513. "tests/ext/aiohttp/test_client.py"))))
  514. (replace 'check
  515. (lambda _
  516. ;; Allow "import tests.utils" to work as expected.
  517. (setenv "PYTHONPATH" (getcwd))
  518. (invoke "pytest" "-vv" "tests"))))))
  519. (native-inputs
  520. (list ;; These are required for the test suite.
  521. python-bottle
  522. python-flask
  523. python-flask-sqlalchemy
  524. python-pymysql
  525. python-pytest
  526. python-pytest-aiohttp
  527. python-requests
  528. python-sqlalchemy
  529. python-webtest))
  530. (propagated-inputs
  531. (list python-aiohttp
  532. python-botocore
  533. python-future
  534. python-jsonpickle
  535. python-urllib3
  536. python-wrapt))
  537. (synopsis "Profile applications on AWS X-Ray")
  538. (description
  539. "The AWS X-Ray SDK for Python enables Python developers to record and
  540. emit information from within their applications to the AWS X-Ray service.")
  541. (license license:asl2.0)))
  542. (define-public python-cfn-lint
  543. (package
  544. (name "python-cfn-lint")
  545. (version "0.54.3")
  546. (home-page "https://github.com/aws-cloudformation/cfn-lint")
  547. (source (origin
  548. (method git-fetch)
  549. (uri (git-reference
  550. (url home-page)
  551. (commit (string-append "v" version))))
  552. (file-name (git-file-name name version))
  553. (sha256
  554. (base32
  555. "106qf19n2k6sdjkb4006aidibd24qqiw901c1613xgjpnyw4dyl6"))))
  556. (build-system python-build-system)
  557. (arguments
  558. `(#:phases
  559. (modify-phases %standard-phases
  560. (replace 'check
  561. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  562. (when tests?
  563. (let ((out (assoc-ref outputs "out")))
  564. ;; Remove test for the documentation update scripts
  565. ;; to avoid a dependency on 'git'.
  566. (delete-file
  567. "test/unit/module/maintenance/test_update_documentation.py")
  568. (delete-file
  569. "test/unit/module/maintenance/test_update_resource_specs.py")
  570. (add-installed-pythonpath inputs outputs)
  571. (setenv "PATH" (string-append out "/bin:"
  572. (getenv "PATH")))
  573. (invoke "python" "-m" "unittest" "discover"
  574. "-s" "test"))))))))
  575. (native-inputs
  576. (list python-pydot python-mock))
  577. (propagated-inputs
  578. (list python-aws-sam-translator
  579. python-jsonpatch
  580. python-jsonschema
  581. python-junit-xml
  582. python-networkx
  583. python-pyyaml
  584. python-six))
  585. (synopsis "Validate CloudFormation templates")
  586. (description
  587. "This package lets you validate CloudFormation YAML/JSON templates against
  588. the CloudFormation spec and additional checks. Includes checking valid values
  589. for resource properties and best practices.")
  590. (license license:expat)))
  591. (define-public python-falcon
  592. (package
  593. (name "python-falcon")
  594. (version "2.0.0")
  595. (source
  596. (origin
  597. (method url-fetch)
  598. (uri (pypi-uri "falcon" version))
  599. (sha256
  600. (base32
  601. "1z6mqfv574x6jiawf67ib52g4kk20c2x7xk7wrn1573b8v7r79gf"))
  602. (modules '((guix build utils)))
  603. (snippet
  604. '(begin
  605. (delete-file-recursively "falcon/vendor")
  606. (substitute* "setup.py"
  607. ((".*falcon\\.vendor\\.mimeparse.*") ""))
  608. (substitute* '("falcon/media/handlers.py"
  609. "falcon/request.py")
  610. (("from falcon\\.vendor ") ""))
  611. (substitute* "falcon.egg-info/SOURCES.txt"
  612. (("falcon/vendor.*") ""))
  613. #t))))
  614. (build-system python-build-system)
  615. (arguments
  616. `(#:phases
  617. (modify-phases %standard-phases
  618. (replace 'check
  619. (lambda* (#:key inputs outputs #:allow-other-keys)
  620. ;; Skip orjson, which requires rust to build.
  621. (substitute* "tests/test_media_handlers.py"
  622. (("== 'CPython") "!= 'CPython"))
  623. (add-installed-pythonpath inputs outputs)
  624. (invoke "pytest" "--ignore" "falcon"))))))
  625. (propagated-inputs
  626. (list python-mimeparse))
  627. (native-inputs
  628. (list python-cython ;for faster binaries
  629. python-mujson
  630. python-msgpack
  631. python-pytest
  632. python-pytest-runner
  633. python-pyyaml
  634. python-rapidjson
  635. python-requests
  636. python-testtools
  637. python-ujson))
  638. (home-page "https://falconframework.org")
  639. (synopsis
  640. "Web framework for building APIs and application backends")
  641. (description
  642. "Falcon is a web API framework for building microservices, application
  643. backends and higher-level frameworks. Among its features are:
  644. @itemize
  645. @item Optimized and extensible code base
  646. @item Routing via URI templates and REST-inspired resource
  647. classes
  648. @item Access to headers and bodies through request and response
  649. classes
  650. @item Request processing via middleware components and hooks
  651. @item Idiomatic HTTP error responses
  652. @item Straightforward exception handling
  653. @item Unit testing support through WSGI helpers and mocks
  654. @item Compatible with both CPython and PyPy
  655. @item Cython support for better performance when used with CPython
  656. @end itemize")
  657. (license license:asl2.0)))
  658. (define-public python-falcon-cors
  659. (package
  660. (name "python-falcon-cors")
  661. (version "1.1.7")
  662. (source
  663. (origin
  664. (method url-fetch)
  665. (uri (pypi-uri "falcon-cors" version))
  666. (sha256
  667. (base32
  668. "12pym7hwsbd8b0c1azn95nas8gm3f1qpr6lpyx0958xm65ffr20p"))))
  669. (build-system python-build-system)
  670. (native-inputs
  671. (list python-falcon))
  672. (home-page
  673. "https://github.com/lwcolton/falcon-cors")
  674. (synopsis "Falcon @dfn{cross-origin resource sharing} (CORS) library")
  675. (description "This middleware provides @dfn{cross-origin resource
  676. sharing} (CORS) support for Falcon. It allows applying a specially crafted
  677. CORS object to the incoming requests, enabling the ability to serve resources
  678. over a different origin than that of the web application.")
  679. (license license:asl2.0)))
  680. (define-public python-furl
  681. (package
  682. (name "python-furl")
  683. (version "2.1.3")
  684. (source
  685. (origin
  686. (method url-fetch)
  687. (uri (pypi-uri "furl" version))
  688. (sha256
  689. (base32
  690. "0knc76pm8pzigs3bpx9fccfsfxqrgblqphar46hq9i364vz8hqas"))))
  691. (build-system python-build-system)
  692. (propagated-inputs
  693. (list python-six python-orderedmultidict))
  694. (native-inputs
  695. (list python-flake8))
  696. (home-page "https://github.com/gruns/furl")
  697. (synopsis "URL manipulation in Python")
  698. (description "Furl provides an easy-to-use alternative to the
  699. @code{urllib} and @code{urlparse} modules for manipulating URLs.")
  700. (license license:unlicense)))
  701. (define-public python-httplib2
  702. (package
  703. (name "python-httplib2")
  704. (version "0.9.2")
  705. (source
  706. (origin
  707. (method url-fetch)
  708. (uri (pypi-uri "httplib2" version))
  709. (sha256
  710. (base32
  711. "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
  712. (build-system python-build-system)
  713. (home-page "https://github.com/jcgregorio/httplib2")
  714. (synopsis "Comprehensive HTTP client library")
  715. (description
  716. "A comprehensive HTTP client library supporting many features left out of
  717. other HTTP libraries.")
  718. (license license:expat)))
  719. (define-public python2-httplib2
  720. (package-with-python2 python-httplib2))
  721. (define-public httpie
  722. (package
  723. (name "httpie")
  724. (version "3.1.0")
  725. (source
  726. (origin
  727. (method url-fetch)
  728. (uri (pypi-uri "httpie" version))
  729. (sha256
  730. (base32
  731. "1npyfvrq0l56bil8rnpj78mav378mxx4zcqzq1jjx4aap1020jif"))))
  732. (build-system python-build-system)
  733. (arguments
  734. ;; The tests attempt to access external web servers, so we cannot run them.
  735. '(#:tests? #f))
  736. (propagated-inputs
  737. (list python-colorama
  738. python-pygments
  739. python-requests
  740. python-requests-toolbelt
  741. python-pysocks
  742. python-charset-normalizer
  743. python-defusedxml
  744. python-multidict))
  745. (home-page "https://httpie.io")
  746. (synopsis "cURL-like tool for humans")
  747. (description
  748. "A command line HTTP client with an intuitive UI, JSON support,
  749. syntax highlighting, wget-like downloads, plugins, and more. It consists of
  750. a single http command designed for painless debugging and interaction with
  751. HTTP servers, RESTful APIs, and web services.")
  752. ;; This was fixed in 1.0.3.
  753. (properties `((lint-hidden-cve . ("CVE-2019-10751"))))
  754. (license license:bsd-3)))
  755. (define-public python-html2text
  756. (package
  757. (name "python-html2text")
  758. (version "2020.1.16")
  759. (source
  760. (origin
  761. (method url-fetch)
  762. (uri (pypi-uri "html2text" version))
  763. (sha256
  764. (base32
  765. "1fvv4z6dblii2wk1x82981ag8yhxbim1v2ksgywxsndh2s7335p2"))))
  766. (build-system python-build-system)
  767. (arguments
  768. '(#:phases
  769. (modify-phases %standard-phases
  770. (replace 'check
  771. (lambda _
  772. (invoke "pytest" "test/"))))))
  773. (native-inputs
  774. (list python-pytest))
  775. (home-page "https://github.com/Alir3z4/html2text")
  776. (synopsis "Convert HTML into plain text")
  777. (description "html2text takes HTML and converts it into plain ASCII text
  778. which is also valid markdown. html2text was originally written by Aaron
  779. Swartz.")
  780. (license license:gpl3+)))
  781. (define-public python-jose
  782. (package
  783. (name "python-jose")
  784. (version "3.3.0")
  785. (home-page "https://github.com/mpdavis/python-jose")
  786. (source (origin
  787. (method git-fetch)
  788. (uri (git-reference (url home-page) (commit version)))
  789. (file-name (git-file-name name version))
  790. (sha256
  791. (base32
  792. "18whsdpllg8574ma4r0qawkgw4nam6lsf63pi6761j38rvl84lg9"))))
  793. (build-system python-build-system)
  794. (arguments
  795. `(#:phases
  796. (modify-phases %standard-phases
  797. (replace 'check
  798. (lambda* (#:key tests? #:allow-other-keys)
  799. (if tests?
  800. (invoke "pytest" "-vv")
  801. (format #t "test suite not run~%"))
  802. #t)))))
  803. (native-inputs
  804. (list ;; All native inputs are for tests.
  805. python-pyasn1 python-pytest python-pytest-cov
  806. python-pytest-runner))
  807. (propagated-inputs
  808. (list python-cryptography python-ecdsa python-rsa python-six))
  809. (synopsis "JOSE implementation in Python")
  810. (description
  811. "The @dfn{JavaScript Object Signing and Encryption} (JOSE) technologies
  812. - JSON Web Signature (JWS), JSON Web Encryption (JWE), JSON Web Key (JWK), and
  813. JSON Web Algorithms (JWA) - collectively can be used to encrypt and/or sign
  814. content using a variety of algorithms.")
  815. (license license:expat)))
  816. (define-public python-pyscss
  817. (package
  818. (name "python-pyscss")
  819. (version "1.3.7")
  820. (source
  821. (origin
  822. (method git-fetch) ; no tests in PyPI release
  823. (uri (git-reference
  824. (url "https://github.com/Kronuz/pyScss")
  825. (commit version)))
  826. (file-name (git-file-name name version))
  827. (sha256
  828. (base32 "0701hziiiw67blafgpmjhzspmrss8mfvif7fw0rs8fikddwwc9g6"))))
  829. (build-system python-build-system)
  830. (arguments
  831. ;; XXX: error in test collection, possible incompatibility with Pytest 6.
  832. `(#:tests? #f
  833. #:phases
  834. (modify-phases %standard-phases
  835. (replace 'check
  836. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  837. (when tests?
  838. (add-installed-pythonpath inputs outputs)
  839. (invoke "python" "-m" "pytest" "--pyargs" "scss")))))))
  840. (native-inputs
  841. (list python-pytest python-pytest-cov))
  842. (inputs
  843. (list pcre))
  844. (home-page "https://github.com/Kronuz/pyScss")
  845. (synopsis "Scss compiler for Python")
  846. (description "@code{pyScss} is a compiler for Sass, a superset language of
  847. CSS3 that adds programming capabilities and some other syntactic sugar.")
  848. (license license:expat)))
  849. (define-public python-jsonpickle
  850. (package
  851. (name "python-jsonpickle")
  852. (version "1.5.2")
  853. (source (origin
  854. (method url-fetch)
  855. (uri (pypi-uri "jsonpickle" version))
  856. (sha256
  857. (base32
  858. "0n93h9b9ad58lxdfbvgsh4b25mkg146qikzcgghyc75vjk7rp2cy"))))
  859. (build-system python-build-system)
  860. (arguments
  861. `(#:phases (modify-phases %standard-phases
  862. (replace 'check
  863. (lambda _
  864. (invoke "pytest" "-vv"
  865. ;; Prevent running the flake8 and black
  866. ;; pytest plugins, which only tests style
  867. ;; and frequently causes harmless failures.
  868. "-o" "addopts=''"))))))
  869. (native-inputs
  870. (list python-setuptools-scm
  871. python-toml ;XXX: for setuptools_scm[toml]
  872. ;; For tests.
  873. python-numpy
  874. python-pandas
  875. python-pytest))
  876. (home-page "https://jsonpickle.github.io/")
  877. (synopsis "Serialize object graphs into JSON")
  878. (description
  879. "This package provides a Python library for serializing any arbitrary
  880. object graph to and from JSON.")
  881. (license license:bsd-3)))
  882. (define-public python-mechanicalsoup
  883. (package
  884. (name "python-mechanicalsoup")
  885. (version "1.0.0")
  886. (source
  887. (origin
  888. (method url-fetch)
  889. (uri (pypi-uri "MechanicalSoup" version))
  890. (sha256
  891. (base32 "01sddjxy3rznh63hnl5lbv1hhk6xyiviwmkiw4x7v4ap35fb3lrp"))))
  892. (build-system python-build-system)
  893. (propagated-inputs
  894. (list python-beautifulsoup4 python-lxml python-requests python-six))
  895. (native-inputs
  896. (list python-pytest-cov
  897. python-pytest-flake8
  898. python-pytest-httpbin
  899. python-pytest-mock
  900. python-pytest-runner
  901. python-requests-mock))
  902. (home-page "https://mechanicalsoup.readthedocs.io/")
  903. (synopsis "Python library for automating website interaction")
  904. (description
  905. "MechanicalSoup is a Python library for automating interaction with
  906. websites. It automatically stores and sends cookies, follows redirects, and can
  907. follow links and submit forms. It doesn’t do JavaScript.")
  908. (license license:expat)))
  909. (define-public python-hyperframe
  910. (package
  911. (name "python-hyperframe")
  912. (version "6.0.1")
  913. (source
  914. (origin
  915. (method url-fetch)
  916. (uri (pypi-uri "hyperframe" version))
  917. (sha256
  918. (base32 "055951gyhnjqpa2al52rj34g8yrls9inyn56n7nfkj0x4d300ldf"))))
  919. (build-system python-build-system)
  920. (arguments
  921. `(#:phases
  922. (modify-phases %standard-phases
  923. (replace 'check
  924. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  925. (when tests?
  926. (add-installed-pythonpath inputs outputs)
  927. (invoke "pytest" "-vv" "test")))))))
  928. (native-inputs
  929. (list python-pytest))
  930. (home-page "https://github.com/python-hyper/hyperframe")
  931. (synopsis "HTTP/2 framing layer for Python")
  932. (description
  933. "This library contains the HTTP/2 framing code used in the hyper project.
  934. It provides a pure-Python codebase that is capable of decoding a binary stream
  935. into HTTP/2 frames.")
  936. (license license:expat)))
  937. (define-public python-hpack
  938. (package
  939. (name "python-hpack")
  940. (version "4.0.0")
  941. (source
  942. (origin
  943. ;; PyPI tarball is missing some files necessary for the tests.
  944. (method git-fetch)
  945. (uri (git-reference
  946. (url "https://github.com/python-hyper/hpack")
  947. (commit (string-append "v" version))))
  948. (file-name (git-file-name name version))
  949. (sha256
  950. (base32 "11qdayvz5a8zlzdcdm37f2z1fgnl67pz6j8xj2dz5rfa5lds29yq"))))
  951. (build-system python-build-system)
  952. (arguments
  953. `(#:phases
  954. (modify-phases %standard-phases
  955. (replace 'check
  956. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  957. (when tests?
  958. (add-installed-pythonpath inputs outputs)
  959. (invoke "pytest" "-vv" "test")))))))
  960. (native-inputs
  961. (list python-pytest))
  962. (home-page "https://hyper.rtfd.org")
  963. (synopsis "Pure-Python HPACK header compression")
  964. (description
  965. "This module contains a pure-Python HTTP/2 header encoding (HPACK) logic
  966. for use in Python programs that implement HTTP/2.")
  967. (license license:expat)))
  968. (define-public python-h11
  969. (package
  970. (name "python-h11")
  971. (version "0.12.0")
  972. (source
  973. (origin
  974. (method url-fetch)
  975. (uri (pypi-uri "h11" version))
  976. (sha256
  977. (base32 "0hk0nll6qazsambp3kl8cxxsbl4gv5y9252qadyk0jky0sv2q8j7"))))
  978. (build-system python-build-system)
  979. (arguments
  980. `(#:phases
  981. (modify-phases %standard-phases
  982. (replace 'check
  983. (lambda* (#:key tests? #:allow-other-keys)
  984. (when tests?
  985. (invoke "pytest" "-vv")))))))
  986. (native-inputs
  987. (list python-pytest))
  988. (home-page "https://github.com/python-hyper/h11")
  989. (synopsis "Pure-Python, bring-your-own-I/O implementation of HTTP/1.1")
  990. (description
  991. "This is a little HTTP/1.1 library written from scratch in Python, heavily
  992. inspired by hyper-h2. It's a bring-your-own-I/O library; h11 contains no IO
  993. code whatsoever. This means you can hook h11 up to your favorite network API,
  994. and that could be anything you want.")
  995. (license license:expat)))
  996. (define-public python-h2
  997. (package
  998. (name "python-h2")
  999. (version "4.1.0")
  1000. (source
  1001. (origin
  1002. (method url-fetch)
  1003. (uri (pypi-uri "h2" version))
  1004. (sha256
  1005. (base32 "1fraip114fm1ha5w37pdc0sk8dn9pb0ck267zrwwpap7zc4clfm8"))))
  1006. (build-system python-build-system)
  1007. (arguments
  1008. `(#:phases
  1009. (modify-phases %standard-phases
  1010. (replace 'check
  1011. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  1012. (when tests?
  1013. (add-installed-pythonpath inputs outputs)
  1014. (invoke "python" "-m" "pytest" "-vv" "test")))))))
  1015. (native-inputs
  1016. (list python-hypothesis-6.23 python-pytest))
  1017. (propagated-inputs
  1018. (list python-hpack python-hyperframe))
  1019. (home-page "https://github.com/python-hyper/h2")
  1020. (synopsis "HTTP/2 State-Machine based protocol implementation")
  1021. (description
  1022. "This module contains a pure-Python implementation of a HTTP/2 protocol
  1023. stack. It does not provide a parsing layer, a network layer, or any rules
  1024. about concurrency. Instead, it's a purely in-memory solution, defined in
  1025. terms of data actions and HTTP/2 frames. This is one building block of a full
  1026. Python HTTP implementation.")
  1027. (license license:expat)))
  1028. (define-public python-sockjs-tornado
  1029. (package
  1030. (name "python-sockjs-tornado")
  1031. (version "1.0.6")
  1032. (source
  1033. (origin
  1034. (method url-fetch)
  1035. (uri (pypi-uri "sockjs-tornado" version))
  1036. (sha256
  1037. (base32
  1038. "15dgv6hw6c7h3m310alw1h6p5443lrm9pyqhcv2smc13fz1v04pc"))))
  1039. (build-system python-build-system)
  1040. (arguments
  1041. `(;; There are no tests, and running the test phase requires missing
  1042. ;; dependencies
  1043. #:tests? #f))
  1044. (propagated-inputs
  1045. (list python-tornado))
  1046. (home-page "https://github.com/mrjoes/sockjs-tornado/")
  1047. (synopsis
  1048. "SockJS Python server implementation on top of the Tornado framework")
  1049. (description
  1050. "SockJS-tornado provides the server-side counterpart to a SockJS client
  1051. library, through the Tornado framework.
  1052. SockJS provides a low-latency, full-duplex, cross-domain communication channel
  1053. between a web browser and web server.")
  1054. (license license:expat)))
  1055. (define-public python2-sockjs-tornado
  1056. (package-with-python2 python-sockjs-tornado))
  1057. (define-public python-flask-assets
  1058. (package
  1059. (name "python-flask-assets")
  1060. (version "2.0")
  1061. (source
  1062. (origin
  1063. (method url-fetch)
  1064. (uri (pypi-uri "Flask-Assets" version))
  1065. (sha256
  1066. (base32 "1hmqldxc7zciksmcl35jx0wbyrrxc7vk2a57mmmd8i07whsymz8x"))))
  1067. (build-system python-build-system)
  1068. (arguments
  1069. ;; Tests require python-flask-script which is incompatible with Flask2.
  1070. `(#:tests? #f))
  1071. (propagated-inputs
  1072. (list python-flask python-webassets))
  1073. (home-page "https://github.com/miracle2k/flask-assets")
  1074. (synopsis "Asset management for Flask")
  1075. (description "This package integrates @code{webassets} with Flask, adding
  1076. support for merging, minifying and compiling CSS and Javascript files.")
  1077. (license license:bsd-2)))
  1078. (define-public python-flask-babel
  1079. (package
  1080. (name "python-flask-babel")
  1081. (version "2.0.0")
  1082. (source
  1083. (origin
  1084. (method url-fetch)
  1085. (uri (pypi-uri "Flask-Babel" version))
  1086. (sha256
  1087. (base32
  1088. "0z95v77vib5il8hphyh16n7i15a2gmc06i615vm346ifvdfg9ypr"))))
  1089. (build-system python-build-system)
  1090. (propagated-inputs
  1091. (list python-flask python-babel python-jinja2 python-pytz))
  1092. (home-page "https://github.com/python-babel/flask-babel")
  1093. (synopsis "Add i18n/l10n support to Flask applications")
  1094. (description "This package implements internationalization and localization
  1095. support for Flask. This is based on the Python babel module as well as pytz -
  1096. both of which are installed automatically if you install this library.")
  1097. (license license:bsd-3)))
  1098. (define-public python-flask-cors
  1099. (package
  1100. (name "python-flask-cors")
  1101. (version "3.0.10")
  1102. (source (origin
  1103. (method url-fetch)
  1104. (uri (pypi-uri "Flask-Cors" version))
  1105. (sha256
  1106. (base32
  1107. "1pl16615fn1pc5n0vdrqlxm45mqsdjjxqv3gfkrs111v7wwkj25n"))))
  1108. (build-system python-build-system)
  1109. (native-inputs
  1110. (list python-flask python-nose python-packaging))
  1111. (propagated-inputs
  1112. (list python-six))
  1113. (home-page "https://flask-cors.readthedocs.io/en/latest/")
  1114. (synopsis "Handle Cross-Origin Resource Sharing with Flask")
  1115. (description
  1116. "This package provides a Flask extension for handling @acronym{CORS,Cross
  1117. Origin Resource Sharing}, making cross-origin AJAX possible.")
  1118. (license license:expat)))
  1119. (define-public python-flask-markdown
  1120. (package
  1121. (name "python-flask-markdown")
  1122. (version "0.3")
  1123. (source
  1124. (origin
  1125. (method url-fetch)
  1126. (uri (pypi-uri "Flask-Markdown" version))
  1127. (sha256
  1128. (base32
  1129. "0l32ikv4f7va926jlq4f7gx0xid247bhlxl6bd9av5dk8ljz1hyq"))))
  1130. (build-system python-build-system)
  1131. (arguments
  1132. '(#:tests? #f)) ; Tests seem to be incompatible with latest python
  1133. (propagated-inputs
  1134. (list python-markdown python-flask))
  1135. (native-inputs
  1136. (list python-nose))
  1137. (home-page "https://github.com/dcolish/flask-markdown")
  1138. (synopsis "Small extension to help with using Markdown in Flask")
  1139. (description
  1140. "Flask-Markdown supports several extensions for Markdown and integrates
  1141. into Jinja2 by default.")
  1142. (license license:bsd-3)))
  1143. (define-public python-flask-misaka
  1144. (package
  1145. (name "python-flask-misaka")
  1146. (version "1.0.0")
  1147. (source
  1148. (origin
  1149. (method url-fetch)
  1150. (uri (pypi-uri "Flask-Misaka" version))
  1151. (sha256
  1152. (base32
  1153. "12gm6hq3lvlj0ddw8p6lk5pky8jk3pw758ihffjl49shnnzc68zl"))))
  1154. (build-system python-build-system)
  1155. (native-inputs
  1156. (list python-coverage python-mock))
  1157. (propagated-inputs
  1158. (list python-flask python-misaka))
  1159. (home-page "https://github.com/singingwolfboy/flask-misaka/")
  1160. (synopsis "Flask interface to Misaka, a Markdown parsing library")
  1161. (description
  1162. "This package provides an interface between the Flask web framework and
  1163. the Misaka Markdown parser.")
  1164. (license license:expat)))
  1165. (define-public python-flask-session
  1166. (package
  1167. (name "python-flask-session")
  1168. (version "0.4.0")
  1169. (source
  1170. (origin
  1171. (method url-fetch)
  1172. (uri (pypi-uri "Flask-Session" version))
  1173. (sha256
  1174. (base32
  1175. "0ihzlhdhss8f93p3njzva9rdm7kmhaakdlzz680wmi583wr59vf9"))))
  1176. (build-system python-build-system)
  1177. (arguments
  1178. '(#:tests? #f)) ; Tests require the various storage backends to be present
  1179. (propagated-inputs
  1180. (list python-cachelib python-flask))
  1181. (home-page "https://github.com/fengsp/flask-session")
  1182. (synopsis "Adds server-side session support to your Flask application")
  1183. (description
  1184. "Flask-Session is an extension for Flask that adds support for
  1185. Server-side sessions, with a variety of different backends for session
  1186. storage.")
  1187. (license license:bsd-3)))
  1188. (define-public python-html5lib
  1189. (package
  1190. (name "python-html5lib")
  1191. (version "1.1")
  1192. (source
  1193. (origin
  1194. (method url-fetch)
  1195. (uri (pypi-uri "html5lib" version))
  1196. (sha256
  1197. (base32
  1198. "0vqlhk0hgbsfkh7ybmby93xhlx8dq6pr5blf356ka3z2c41b9rdj"))))
  1199. (build-system python-build-system)
  1200. (propagated-inputs
  1201. (list python-six python-webencodings
  1202. ;; Required by Calibre 5.
  1203. python-chardet))
  1204. (arguments
  1205. `(#:test-target "check"))
  1206. (home-page
  1207. "https://github.com/html5lib/html5lib-python")
  1208. (synopsis
  1209. "Python HTML parser based on the WHATWG HTML specification")
  1210. (description
  1211. "Html5lib is an HTML parser based on the WHATWG HTML specification
  1212. and written in Python.")
  1213. (license license:expat)))
  1214. (define-public python2-html5lib
  1215. (package-with-python2 python-html5lib))
  1216. ;; Needed for python-bleach, a dependency of python-notebook
  1217. (define-public python-html5lib-0.9
  1218. (package
  1219. (inherit python-html5lib)
  1220. (version "0.999")
  1221. (source
  1222. (origin
  1223. (method url-fetch)
  1224. (uri (pypi-uri "html5lib" version))
  1225. (sha256
  1226. (base32
  1227. "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
  1228. (define-public python2-html5lib-0.9
  1229. (package-with-python2 python-html5lib-0.9))
  1230. (define-public python-html5-parser
  1231. (package
  1232. (name "python-html5-parser")
  1233. (version "0.4.10")
  1234. (source (origin
  1235. (method url-fetch)
  1236. (uri (pypi-uri "html5-parser" version))
  1237. (sha256
  1238. (base32
  1239. "195wgxls3df7djry9cz3p2k9644l6bfd66fczbaw55fsq0c48agr"))))
  1240. (build-system python-build-system)
  1241. (native-inputs
  1242. (list pkg-config))
  1243. (inputs
  1244. (list libxml2))
  1245. (propagated-inputs
  1246. (list python-lxml python-beautifulsoup4 python-chardet))
  1247. (home-page "https://html5-parser.readthedocs.io")
  1248. (synopsis "Fast C-based HTML5 parsing for Python")
  1249. (description "This package provides a fast implementation of the HTML5
  1250. parsing spec for Python. Parsing is done in C using a variant of the gumbo
  1251. parser. The gumbo parse tree is then transformed into an lxml tree, also in
  1252. C, yielding parse times that can be a thirtieth of the html5lib parse times.")
  1253. ;; src/as-python-tree.[c|h] are licensed GPL3. The other files
  1254. ;; indicate ASL2.0, including the LICENSE file for the whole project.
  1255. (license (list license:asl2.0 license:gpl3))))
  1256. (define-public python-minio
  1257. (package
  1258. (name "python-minio")
  1259. (version "6.0.0")
  1260. (source (origin
  1261. (method url-fetch)
  1262. (uri (pypi-uri "minio" version))
  1263. (sha256
  1264. (base32
  1265. "1cxpa0m7mdvpdbc1g6wlihq6ja4g4paxkl6f3q84bbnx07zpbllp"))))
  1266. (build-system python-build-system)
  1267. (arguments
  1268. '(#:phases (modify-phases %standard-phases
  1269. (add-before 'check 'disable-failing-tests
  1270. (lambda _
  1271. ;; This test requires network access.
  1272. (delete-file "tests/unit/credentials_test.py")
  1273. #t)))))
  1274. (native-inputs
  1275. (list python-faker python-mock python-nose))
  1276. (propagated-inputs
  1277. (list python-certifi python-configparser python-dateutil python-pytz
  1278. python-urllib3))
  1279. (home-page "https://github.com/minio/minio-py")
  1280. (synopsis "Programmatically access Amazon S3 from Python")
  1281. (description
  1282. "This package provides a Python library for interacting with any
  1283. Amazon S3 compatible object storage server.")
  1284. (license license:asl2.0)))
  1285. (define-public python-pycurl
  1286. (package
  1287. (name "python-pycurl")
  1288. (version "7.43.0.5")
  1289. (source
  1290. (origin
  1291. (method url-fetch)
  1292. (uri (pypi-uri "pycurl" version))
  1293. (sha256
  1294. (base32 "1cwlb76vddqp2mxqvjbhf367caddzy82rhangddjjhjqaj8x4zgc"))))
  1295. (build-system python-build-system)
  1296. (arguments
  1297. ;; The tests attempt to access external web servers, so we cannot run
  1298. ;; them. Furthermore, they are skipped altogether when using Python 2.
  1299. '(#:tests? #f
  1300. #:phases (modify-phases %standard-phases
  1301. (add-before 'build 'configure-tls-backend
  1302. (lambda _
  1303. ;; XXX: PycURL fails to automatically determine which TLS
  1304. ;; backend to use when cURL is built with --disable-static.
  1305. ;; See setup.py and <https://github.com/pycurl/pycurl/pull/147>.
  1306. (setenv "PYCURL_SSL_LIBRARY" "gnutls")
  1307. #t)))))
  1308. (native-inputs
  1309. (list python-nose python-bottle))
  1310. (inputs
  1311. (list curl gnutls))
  1312. (home-page "http://pycurl.io/")
  1313. (synopsis "Lightweight Python wrapper around libcurl")
  1314. (description "Pycurl is a lightweight wrapper around libcurl. It provides
  1315. high-speed transfers via libcurl and frequently outperforms alternatives.")
  1316. ;; Per 'README.rst', this is dual-licensed: users can redistribute pycurl
  1317. ;; under the terms of LGPLv2.1+ or Expat.
  1318. (license (list license:lgpl2.1+ license:expat))))
  1319. (define-public python2-pycurl
  1320. (package-with-python2 python-pycurl))
  1321. (define-public python-webencodings
  1322. (package
  1323. (name "python-webencodings")
  1324. (version "0.5.1")
  1325. (source (origin
  1326. (method url-fetch)
  1327. (uri (pypi-uri "webencodings" version))
  1328. (sha256
  1329. (base32
  1330. "08qrgrc4hrximb2gqnl69g01s93rhf2842jfxdjljc1dbwj1qsmk"))))
  1331. (build-system python-build-system)
  1332. (arguments
  1333. '(#:phases
  1334. (modify-phases %standard-phases
  1335. (replace 'check
  1336. (lambda _
  1337. (invoke "py.test" "-v" "webencodings/tests.py")
  1338. #t)))))
  1339. (native-inputs
  1340. (list python-pytest))
  1341. (home-page "https://github.com/SimonSapin/python-webencodings")
  1342. (synopsis "Character encoding aliases for legacy web content")
  1343. (description
  1344. "In order to be compatible with legacy web content when interpreting
  1345. something like @code{Content-Type: text/html; charset=latin1}, tools need
  1346. to use a particular set of aliases for encoding labels as well as some
  1347. overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
  1348. the web are actually aliases for @code{windows-1252}, and a @code{UTF-8}
  1349. or @code{UTF-16} BOM takes precedence over any other encoding declaration.
  1350. The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
  1351. defines all such details so that implementations do not have to
  1352. reverse-engineer each other.
  1353. This module implements the Encoding standard and has encoding labels and
  1354. BOM detection, but the actual implementation for encoders and decoders
  1355. is Python’s.")
  1356. (license license:bsd-3)))
  1357. (define-public python2-webencodings
  1358. (package-with-python2 python-webencodings))
  1359. (define-public python-openid
  1360. (package
  1361. (name "python-openid")
  1362. (version "3.2.0")
  1363. (source
  1364. (origin
  1365. (method url-fetch)
  1366. (uri (pypi-uri "python3-openid" version))
  1367. (sha256
  1368. (base32
  1369. "1bxf9a3ny1js422j962zfzl4a9dhj192pvai05whn7j0iy9gdyrk"))))
  1370. (build-system python-build-system)
  1371. (arguments
  1372. `(#:phases
  1373. (modify-phases %standard-phases
  1374. (replace 'check
  1375. (lambda* (#:key tests? #:allow-other-keys)
  1376. (when tests?
  1377. (invoke "coverage" "run" "-m"
  1378. "unittest" "openid.test.test_suite")))))))
  1379. (propagated-inputs
  1380. (list python-defusedxml))
  1381. (native-inputs
  1382. (list python-coverage python-psycopg2 python-django))
  1383. (home-page "https://github.com/necaris/python3-openid")
  1384. (synopsis "OpenID support for servers and consumers")
  1385. (description "This library provides OpenID authentication for Python, both
  1386. for clients and servers.")
  1387. (license license:asl2.0)))
  1388. (define-public python-cssutils
  1389. (package
  1390. (name "python-cssutils")
  1391. (version "1.0.2")
  1392. (source
  1393. (origin
  1394. (method url-fetch)
  1395. (uri (pypi-uri "cssutils" version))
  1396. (sha256
  1397. (base32
  1398. "1bxchrbqzapwijap0yhlxdil1w9bmwvgx77aizlkhc2mcxjg1z52"))))
  1399. (build-system python-build-system)
  1400. (native-inputs
  1401. (list unzip)) ; for unpacking the source
  1402. (arguments
  1403. `(#:tests? #f)) ; tests require python-pbr < 1.7.0
  1404. (home-page "http://cthedot.de/cssutils/")
  1405. (synopsis
  1406. "CSS Cascading Style Sheets library for Python")
  1407. (description
  1408. "Cssutils is a Python package for parsing and building CSS
  1409. Cascading Style Sheets. Currently it provides a DOM only and no rendering
  1410. options.")
  1411. (license license:lgpl3+)))
  1412. (define-public python-css-parser
  1413. (package
  1414. (inherit python-cssutils)
  1415. (name "python-css-parser")
  1416. (version "1.0.7")
  1417. (source
  1418. (origin
  1419. (method url-fetch)
  1420. (uri (pypi-uri "css-parser" version ".tar.gz"))
  1421. (sha256
  1422. (base32 "1ldv9s3an4pgk7b5x6z07rw9b5fdrasdldnf22829pb26b39dq15"))))
  1423. (home-page "https://github.com/ebook-utils/css-parser")
  1424. (synopsis "Fork of cssutils modified for parsing ebooks")
  1425. (description
  1426. "Css-parser is a Python package for parsing and building CSS
  1427. Cascading Style Sheets. Currently it provides a DOM only and no rendering
  1428. options.
  1429. It's a fork of cssutils 1.0.2, updated and modified for parsing ebooks, due to
  1430. cssutils not receiving updates as of 1.0.2.")
  1431. (license license:lgpl3+)))
  1432. (define-public python-cssselect
  1433. (package
  1434. (name "python-cssselect")
  1435. (version "1.1.0")
  1436. (source (origin
  1437. ;; The PyPI release does not contain tests.
  1438. (method git-fetch)
  1439. (uri (git-reference
  1440. (url "https://github.com/scrapy/cssselect")
  1441. (commit (string-append "v" version))))
  1442. (file-name (git-file-name name version))
  1443. (sha256
  1444. (base32
  1445. "0xslrnhbrmgakp4xg6k26qffay3kqffp3a2z2sk27c65rwxa79kc"))))
  1446. (build-system python-build-system)
  1447. (arguments
  1448. `(#:phases (modify-phases %standard-phases
  1449. (replace 'check
  1450. (lambda _
  1451. (invoke "pytest" "-vv"))))))
  1452. (native-inputs
  1453. (list python-lxml python-pytest))
  1454. (home-page "https://github.com/scrapy/cssselect")
  1455. (synopsis "CSS3 selector parser and translator to XPath 1.0")
  1456. (description
  1457. "Cssselect ia a Python module that parses CSS3 Selectors and translates
  1458. them to XPath 1.0 expressions. Such expressions can be used in lxml or
  1459. another XPath engine to find the matching elements in an XML or HTML document.")
  1460. (license license:bsd-3)))
  1461. (define-public python-databricks-cli
  1462. (package
  1463. (name "python-databricks-cli")
  1464. (version "0.14.1")
  1465. (home-page "https://github.com/databricks/databricks-cli")
  1466. (source (origin
  1467. (method git-fetch)
  1468. (uri (git-reference (url home-page) (commit version)))
  1469. (file-name (git-file-name name version))
  1470. (sha256
  1471. (base32
  1472. "03w19rzh72jll9phai23wp0c2mlv39qsrv50mhckziy39z60yxh8"))))
  1473. (build-system python-build-system)
  1474. (arguments
  1475. `(#:phases (modify-phases %standard-phases
  1476. (replace 'check
  1477. (lambda _
  1478. (invoke "pytest" "tests" "-vv"
  1479. ;; XXX: This fails with newer Pytest
  1480. ;; (upstream uses Pytest 3..).
  1481. "-k" "not test_get_request_with_list"))))))
  1482. (native-inputs
  1483. (list ;; For tests.
  1484. python-decorator python-mock python-pytest python-requests-mock))
  1485. (propagated-inputs
  1486. (list python-click python-configparser python-requests python-six
  1487. python-tabulate))
  1488. (synopsis "Command line interface for Databricks")
  1489. (description
  1490. "The Databricks Command Line Interface is a tool which provides an easy
  1491. to use interface to the Databricks platform. The CLI is built on top of the
  1492. Databricks REST APIs.")
  1493. (license license:asl2.0)))
  1494. (define-public python-openid-cla
  1495. (package
  1496. (name "python-openid-cla")
  1497. (version "1.2")
  1498. (source
  1499. (origin
  1500. (method url-fetch)
  1501. (uri (pypi-uri "python-openid-cla" version))
  1502. (sha256
  1503. (base32
  1504. "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
  1505. (build-system python-build-system)
  1506. (arguments '(#:tests? #f)) ; No tests.
  1507. (home-page "https://github.com/puiterwijk/python-openid-cla/")
  1508. (synopsis "Implementation of the OpenID CLA extension for python-openid")
  1509. (description "@code{openid-cla} is an implementation of the OpenID
  1510. contributor license agreement extension for python-openid.")
  1511. (license license:bsd-3)))
  1512. (define-public python-openid-teams
  1513. (package
  1514. (name "python-openid-teams")
  1515. (version "1.1")
  1516. (source
  1517. (origin
  1518. (method url-fetch)
  1519. (uri (pypi-uri "python-openid-teams" version))
  1520. (sha256
  1521. (base32
  1522. "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
  1523. (build-system python-build-system)
  1524. (arguments '(#:tests? #f)) ; No tests.
  1525. (home-page "https://github.com/puiterwijk/python-openid-teams/")
  1526. (synopsis "Implementation of the OpenID teams extension for python-openid")
  1527. (description
  1528. "@code{openid-teams} is an implementation of the OpenID
  1529. teams extension for python-openid.")
  1530. (license license:bsd-3)))
  1531. (define-public python-priority
  1532. (package
  1533. (name "python-priority")
  1534. (version "1.3.0")
  1535. (source
  1536. (origin
  1537. (method url-fetch)
  1538. (uri (pypi-uri "priority" version))
  1539. (sha256
  1540. (base32 "1gpzn9k9zgks0iw5wdmad9b4dry8haiz2sbp6gycpjkzdld9dhbb"))))
  1541. (build-system python-build-system)
  1542. (arguments
  1543. `(#:phases
  1544. (modify-phases %standard-phases
  1545. (replace 'check
  1546. (lambda* (#:key inputs outputs #:allow-other-keys)
  1547. (add-installed-pythonpath inputs outputs)
  1548. (invoke "pytest" "-vv" "test" "-k"
  1549. ;; This test exceeded the Hypothesis deadline.
  1550. "not test_period_of_repetition"))))))
  1551. (native-inputs
  1552. (list python-hypothesis python-pytest python-pytest-cov
  1553. python-pytest-xdist))
  1554. (home-page "https://python-hyper.org/projects/priority/en/latest/")
  1555. (synopsis "Pure-Python implementation of the HTTP/2 priority tree")
  1556. (description
  1557. "Priority is a pure-Python implementation of the priority logic for HTTP/2,
  1558. set out in RFC 7540 Section 5.3 (Stream Priority).")
  1559. (license license:expat)))
  1560. (define-public python-wsproto
  1561. (package
  1562. (name "python-wsproto")
  1563. (version "0.15.0")
  1564. (source
  1565. (origin
  1566. (method url-fetch)
  1567. (uri (pypi-uri "wsproto" version))
  1568. (sha256
  1569. (base32 "17gsxlli4w8am1wwwl3k90hpdfa213ax40ycbbvb7hjx1v1rhiv1"))))
  1570. (build-system python-build-system)
  1571. (arguments
  1572. `(#:phases
  1573. (modify-phases %standard-phases
  1574. (replace 'check
  1575. (lambda* (#:key inputs outputs #:allow-other-keys)
  1576. (add-installed-pythonpath inputs outputs)
  1577. (invoke "pytest" "-vv" "test"))))))
  1578. (native-inputs
  1579. (list python-pytest))
  1580. (propagated-inputs
  1581. (list python-h11))
  1582. (home-page "https://github.com/python-hyper/wsproto/")
  1583. (synopsis "WebSockets state-machine based protocol implementation")
  1584. (description
  1585. "@code{wsproto} is a pure-Python implementation of a WebSocket protocol
  1586. stack. It's written from the ground up to be embeddable in whatever program you
  1587. choose to use, ensuring that you can communicate via WebSockets, as defined in
  1588. RFC6455, regardless of your programming paradigm.")
  1589. (license license:expat)))
  1590. (define-public hypercorn
  1591. (package
  1592. (name "hypercorn")
  1593. (version "0.11.2")
  1594. (source
  1595. (origin
  1596. (method url-fetch)
  1597. (uri (pypi-uri "Hypercorn" version))
  1598. (sha256
  1599. (base32 "16kai5d12f05jr89mj611zslxqri4cd7ixcgd6yhl211qlcyg8av"))))
  1600. (build-system python-build-system)
  1601. (arguments
  1602. `(#:phases
  1603. (modify-phases %standard-phases
  1604. (replace 'check
  1605. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  1606. (when tests?
  1607. (add-installed-pythonpath inputs outputs)
  1608. (invoke "python" "-m" "pytest")))))))
  1609. ;; Propagate because Hypercorn also exposes functionality over a module.
  1610. (propagated-inputs
  1611. (list python-h11
  1612. python-h2
  1613. python-priority
  1614. python-toml
  1615. python-typing-extensions
  1616. python-wsproto))
  1617. (native-inputs
  1618. (list python-hypothesis
  1619. python-mock
  1620. python-pytest
  1621. python-pytest-asyncio
  1622. python-pytest-cov
  1623. python-pytest-trio
  1624. python-trio))
  1625. (home-page "https://gitlab.com/pgjones/hypercorn/")
  1626. (synopsis "ASGI Server based on Hyper libraries")
  1627. (description
  1628. "Hypercorn is an ASGI web server based on the sans-io hyper, h11, h2, and
  1629. wsproto libraries and inspired by Gunicorn. It supports HTTP/1, HTTP/2,
  1630. WebSockets (over HTTP/1 and HTTP/2), ASGI/2, and ASGI/3 specifications. It can
  1631. utilise asyncio, uvloop, or trio worker types.")
  1632. (license license:expat)))
  1633. (define-public python-hypercorn
  1634. (deprecated-package "python-hypercorn" hypercorn))
  1635. (define-public python-querystring-parser
  1636. (package
  1637. (name "python-querystring-parser")
  1638. (version "1.2.4")
  1639. (source (origin
  1640. (method url-fetch)
  1641. (uri (pypi-uri "querystring_parser" version))
  1642. (sha256
  1643. (base32
  1644. "0qlar8a0wa003hm2z6wcpb625r6vjj0a70rsni9h8lz0zwfcwkv4"))))
  1645. (build-system python-build-system)
  1646. (arguments
  1647. `(#:phases (modify-phases %standard-phases
  1648. (replace 'check
  1649. (lambda _
  1650. ;; XXX FIXME: This test is broken with Python 3.7:
  1651. ;; https://github.com/bernii/querystring-parser/issues/35
  1652. (substitute* "querystring_parser/tests.py"
  1653. (("self\\.assertEqual\\(self\\.knownValuesNormalized, result\\)")
  1654. "True"))
  1655. (invoke "python" "querystring_parser/tests.py"))))))
  1656. (propagated-inputs
  1657. (list python-six))
  1658. (home-page "https://github.com/bernii/querystring-parser")
  1659. (synopsis "QueryString parser that correctly handles nested dictionaries")
  1660. (description
  1661. "This package provides a query string parser for Python and Django
  1662. projects that correctly creates nested dictionaries from sent form/querystring
  1663. data.")
  1664. (license license:expat)))
  1665. (define-public python-tornado
  1666. (package
  1667. (name "python-tornado")
  1668. (version "5.1.1")
  1669. (source
  1670. (origin
  1671. (method url-fetch)
  1672. (uri (pypi-uri "tornado" version))
  1673. (sha256
  1674. (base32
  1675. "02clqk2116jbnq8lnaqmdw3p52nqrd9ib59r4xz2ll43fpcmhlaf"))))
  1676. (build-system python-build-system)
  1677. (arguments
  1678. '(;; FIXME: Two tests error out with:
  1679. ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
  1680. ;; #:phases
  1681. ;; (modify-phases %standard-phases
  1682. ;; (replace 'check
  1683. ;; (lambda _
  1684. ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
  1685. ;; ;; "tornado/platform/kqueue.py". This is the supported method:
  1686. ;; (invoke "python" "-m" "tornado.test.runtests")
  1687. ;; #t)))
  1688. #:tests? #f))
  1689. (native-inputs
  1690. (list python-certifi))
  1691. (home-page "https://www.tornadoweb.org/")
  1692. (synopsis "Python web framework and asynchronous networking library")
  1693. (description
  1694. "Tornado is a Python web framework and asynchronous networking library,
  1695. originally developed at FriendFeed. By using non-blocking network I/O,
  1696. Tornado can scale to tens of thousands of open connections, making it ideal
  1697. for long polling, WebSockets, and other applications that require a long-lived
  1698. connection to each user.")
  1699. (license license:asl2.0)
  1700. (properties `((python2-variant . ,(delay python2-tornado))))))
  1701. (define-public python-tornado-6
  1702. (package
  1703. (name "python-tornado")
  1704. (version "6.1")
  1705. (source
  1706. (origin
  1707. (method url-fetch)
  1708. (uri (pypi-uri "tornado" version))
  1709. (sha256
  1710. (base32
  1711. "14cpzdv6p6qvk6vn02krdh5rcfdi174ifdbr5s6lcnymgcfyiiik"))))
  1712. (build-system python-build-system)
  1713. (arguments
  1714. '(#:phases
  1715. (modify-phases %standard-phases
  1716. (replace 'check
  1717. (lambda _
  1718. (invoke "python" "-m" "tornado.test.runtests")
  1719. #t)))))
  1720. (native-inputs
  1721. (list python-certifi))
  1722. (home-page "https://www.tornadoweb.org/")
  1723. (synopsis "Python web framework and asynchronous networking library")
  1724. (description
  1725. "Tornado is a Python web framework and asynchronous networking library,
  1726. originally developed at FriendFeed. By using non-blocking network I/O,
  1727. Tornado can scale to tens of thousands of open connections, making it ideal
  1728. for long polling, WebSockets, and other applications that require a long-lived
  1729. connection to each user.")
  1730. (license license:asl2.0)))
  1731. (define-public python2-tornado
  1732. (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
  1733. (package/inherit tornado
  1734. (propagated-inputs
  1735. `(("python2-backport-ssl-match-hostname"
  1736. ,python2-backport-ssl-match-hostname)
  1737. ("python2-backports-abc" ,python2-backports-abc)
  1738. ("python2-singledispatch" ,python2-singledispatch)
  1739. ,@(package-propagated-inputs tornado))))))
  1740. (define-public python-tornado-http-auth
  1741. (package
  1742. (name "python-tornado-http-auth")
  1743. (version "1.1.1")
  1744. (source
  1745. (origin
  1746. (method url-fetch)
  1747. (uri (pypi-uri "tornado-http-auth" version))
  1748. (sha256
  1749. (base32 "0hyc5f0a09i5yb99pk4bxpg6w9ichbrb5cv7hc9hff7rxd8w0v0x"))))
  1750. (build-system python-build-system)
  1751. (propagated-inputs
  1752. (list python-tornado))
  1753. (home-page "https://github.com/gvalkov/tornado-http-auth")
  1754. (synopsis "Digest and basic authentication module for Tornado")
  1755. (description
  1756. "Provides support for adding authentication to services using the Tornado
  1757. web framework, either via the basic or digest authentication schemes.")
  1758. (license license:asl2.0)))
  1759. (define-public python-terminado
  1760. (package
  1761. (name "python-terminado")
  1762. (version "0.10.0")
  1763. (source
  1764. (origin
  1765. (method url-fetch)
  1766. (uri (pypi-uri "terminado" version))
  1767. (sha256
  1768. (base32
  1769. "1smvra3sc9sg64w49kfn5yhagshq3x55839748ck5dvxvk4hgza6"))))
  1770. (build-system python-build-system)
  1771. (propagated-inputs
  1772. (list python-tornado-6 python-ptyprocess))
  1773. (native-inputs
  1774. (list python-pytest))
  1775. (arguments
  1776. `(#:phases
  1777. (modify-phases %standard-phases
  1778. (replace 'check
  1779. (lambda _ (invoke "pytest" "-vv"))))))
  1780. (home-page "https://github.com/jupyter/terminado")
  1781. (synopsis "Terminals served to term.js using Tornado websockets")
  1782. (description "This package provides a Tornado websocket backend for the
  1783. term.js Javascript terminal emulator library.")
  1784. (license license:bsd-2)))
  1785. (define-public python-wsgi-intercept
  1786. (package
  1787. (name "python-wsgi-intercept")
  1788. (version "1.2.2")
  1789. (source (origin
  1790. (method url-fetch)
  1791. (uri (pypi-uri "wsgi_intercept" version))
  1792. (sha256
  1793. (base32
  1794. "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
  1795. (build-system python-build-system)
  1796. (propagated-inputs
  1797. (list python-six))
  1798. (native-inputs
  1799. (list python-pytest python-httplib2 python-requests python-urllib3))
  1800. (synopsis "Puts a WSGI application in place of a real URI for testing")
  1801. (description "Wsgi_intercept installs a WSGI application in place of a real
  1802. URI for testing. Testing a WSGI application normally involves starting a
  1803. server at a local host and port, then pointing your test code to that address.
  1804. Instead, this library lets you intercept calls to any specific host/port
  1805. combination and redirect them into a WSGI application importable by your test
  1806. program. Thus, you can avoid spawning multiple processes or threads to test
  1807. your Web app.")
  1808. (home-page "https://github.com/cdent/wsgi-intercept")
  1809. (license license:expat)))
  1810. (define-public python-webob
  1811. (package
  1812. (name "python-webob")
  1813. (version "1.8.6")
  1814. (source
  1815. (origin
  1816. (method url-fetch)
  1817. (uri (pypi-uri "WebOb" version))
  1818. (sha256
  1819. (base32
  1820. "026i3z99nr3px75isa9mbnky5i7rffiv4d124h5kxfjjsxz92fma"))))
  1821. (build-system python-build-system)
  1822. (native-inputs
  1823. (list python-nose))
  1824. (home-page "https://webob.org/")
  1825. (synopsis "WSGI request and response object")
  1826. (description
  1827. "WebOb provides wrappers around the WSGI request environment, and an
  1828. object to help create WSGI responses.")
  1829. (license license:expat)))
  1830. (define-public python2-webob
  1831. (package-with-python2 python-webob))
  1832. (define-public python-zope-event
  1833. (package
  1834. (name "python-zope-event")
  1835. (version "4.4")
  1836. (source
  1837. (origin
  1838. (method url-fetch)
  1839. (uri (pypi-uri "zope.event" version))
  1840. (sha256
  1841. (base32
  1842. "1ksbc726av9xacml6jhcfyn828hlhb9xlddpx6fcvnlvmpmpvhk9"))))
  1843. (build-system python-build-system)
  1844. (home-page "https://pypi.org/project/zope.event/")
  1845. (synopsis "Event publishing system for Python")
  1846. (description "Zope.event provides an event publishing API, intended for
  1847. use by applications which are unaware of any subscribers to their events. It
  1848. is a simple event-dispatching system on which more sophisticated event
  1849. dispatching systems can be built.")
  1850. (license license:zpl2.1)))
  1851. (define-public python2-zope-event
  1852. (package-with-python2 python-zope-event))
  1853. (define-public python-zope-interface
  1854. (package
  1855. (name "python-zope-interface")
  1856. (version "5.1.0")
  1857. (source
  1858. (origin
  1859. (method url-fetch)
  1860. (uri (pypi-uri "zope.interface" version))
  1861. (sha256
  1862. (base32
  1863. "03nrl6b8cb600dnnh46y149awvrm0gxyqgwq5hdw3lvys8mw9r20"))))
  1864. (build-system python-build-system)
  1865. (arguments '(#:tests? #f)) ; test suite can't find python-zope-testing
  1866. (native-inputs
  1867. (list python-coverage python-nose python-zope-event
  1868. python-zope-testing))
  1869. (home-page "https://github.com/zopefoundation/zope.interface")
  1870. (synopsis "Python implementation of the \"design by contract\"
  1871. methodology")
  1872. (description "Zope.interface provides an implementation of \"object
  1873. interfaces\" for Python. Interfaces are a mechanism for labeling objects as
  1874. conforming to a given API or contract.")
  1875. (license license:zpl2.1)))
  1876. (define-public python2-zope-interface
  1877. (package-with-python2 python-zope-interface))
  1878. (define-public python-zope-exceptions
  1879. (package
  1880. (name "python-zope-exceptions")
  1881. (version "4.4")
  1882. (source
  1883. (origin
  1884. (method url-fetch)
  1885. (uri (pypi-uri "zope.exceptions" version))
  1886. (sha256
  1887. (base32
  1888. "1nkgfwawswmyc6i0b8g3ymvja4mb507m8yhid8s4rbxq3dmqhwhd"))))
  1889. (build-system python-build-system)
  1890. (arguments
  1891. '(#:phases
  1892. (modify-phases %standard-phases
  1893. (replace 'check
  1894. (lambda* (#:key tests? #:allow-other-keys)
  1895. (if tests?
  1896. (invoke "zope-testrunner" "--test-path=src")
  1897. (format #t "test suite not run~%")))))))
  1898. (native-inputs
  1899. `(("python-zope-testrunner" ,python-zope-testrunner-bootstrap)))
  1900. (propagated-inputs
  1901. (list python-zope-interface))
  1902. (home-page "https://pypi.org/project/zope.exceptions/")
  1903. (synopsis "Zope exceptions")
  1904. (description "Zope.exceptions provides general-purpose exception types
  1905. that have uses outside of the Zope framework.")
  1906. (license license:zpl2.1)))
  1907. (define (python-zope-bootstrap-package orig)
  1908. (package
  1909. (inherit orig)
  1910. (name (string-append (package-name orig) "-bootstrap"))
  1911. (arguments
  1912. (if (null? (package-arguments orig))
  1913. `(#:tests? #f
  1914. #:phases (modify-phases %standard-phases
  1915. (delete 'sanity-check)))
  1916. (substitute-keyword-arguments (package-arguments orig)
  1917. ((#:tests? _ #f) #f)
  1918. ((#:phases phases '%standard-phases)
  1919. `(modify-phases ,phases
  1920. (delete 'sanity-check))))))
  1921. (propagated-inputs `())
  1922. (native-inputs `())
  1923. (properties `((hidden? . #t)))))
  1924. (define-public python-zope-exceptions-bootstrap
  1925. (python-zope-bootstrap-package python-zope-exceptions))
  1926. (define-public python2-zope-exceptions
  1927. (package-with-python2 python-zope-exceptions))
  1928. (define-public python-zope-testing
  1929. (package
  1930. (name "python-zope-testing")
  1931. (version "4.7")
  1932. (source
  1933. (origin
  1934. (method url-fetch)
  1935. (uri (pypi-uri "zope.testing" version))
  1936. (sha256
  1937. (base32
  1938. "1sh3c3i0m8n8fnhqiry0bk3rr356i56ry7calmn57s1pvv8yhsyn"))))
  1939. (build-system python-build-system)
  1940. (home-page "https://pypi.org/project/zope.testing/")
  1941. (synopsis "Zope testing helpers")
  1942. (description "Zope.testing provides a number of testing utilities for HTML
  1943. forms, HTTP servers, regular expressions, and more.")
  1944. (license license:zpl2.1)))
  1945. (define-public python2-zope-testing
  1946. (package-with-python2 python-zope-testing))
  1947. (define-public python-zope-testrunner
  1948. (package
  1949. (name "python-zope-testrunner")
  1950. (version "5.2")
  1951. (source
  1952. (origin
  1953. (method url-fetch)
  1954. (uri (pypi-uri "zope.testrunner" version))
  1955. (sha256
  1956. (base32
  1957. "0jyyf1dcz156q95x2y7yw2v420q2xn3cff0c5aci7hmdmcbn0gc7"))))
  1958. (build-system python-build-system)
  1959. (arguments
  1960. '(#:tests? #f ;FIXME: Tests can't find zope.interface.
  1961. #:phases
  1962. (modify-phases %standard-phases
  1963. (add-after 'unpack 'remove-problematic-test
  1964. (lambda _
  1965. ;; This test contains invalid syntax, which breaks bytecode
  1966. ;; compilation. For simplicity just remove it.
  1967. (delete-file
  1968. "src/zope/testrunner/tests/testrunner-ex/sample2/badsyntax.py"))))))
  1969. (native-inputs
  1970. (list python-zope-testing))
  1971. (propagated-inputs
  1972. (list python-six python-zope-exceptions python-zope-interface))
  1973. (home-page "https://pypi.org/project/zope.testrunner/")
  1974. (synopsis "Zope testrunner script")
  1975. (description "Zope.testrunner provides a script for running Python
  1976. tests.")
  1977. (license license:zpl2.1)))
  1978. (define-public python-zope-testrunner-bootstrap
  1979. (package
  1980. (inherit (python-zope-bootstrap-package python-zope-testrunner))
  1981. (propagated-inputs
  1982. `(("python-six" ,python-six)
  1983. ("python-zope-exceptions" ,python-zope-exceptions-bootstrap)))
  1984. (properties `((hidden? . #t)))))
  1985. (define-public python2-zope-testrunner
  1986. (package-with-python2 python-zope-testrunner))
  1987. (define-public python-zope-i18nmessageid
  1988. (package
  1989. (name "python-zope-i18nmessageid")
  1990. (version "5.0.1")
  1991. (source
  1992. (origin
  1993. (method url-fetch)
  1994. (uri (pypi-uri "zope.i18nmessageid" version))
  1995. (sha256
  1996. (base32
  1997. "0ndhn4w1qgwkfbwf9vm2bgq418z5g0wmfsgl0d9nz62cd0mi8d4m"))))
  1998. (build-system python-build-system)
  1999. (native-inputs
  2000. (list python-coverage python-zope-testrunner))
  2001. (propagated-inputs
  2002. (list python-six))
  2003. (home-page "https://pypi.org/project/zope.i18nmessageid/")
  2004. (synopsis "Message identifiers for internationalization")
  2005. (description "Zope.i18nmessageid provides facilities for declaring
  2006. internationalized messages within program source text.")
  2007. (license license:zpl2.1)))
  2008. (define-public python2-zope-i18nmessageid
  2009. (package-with-python2 python-zope-i18nmessageid))
  2010. (define-public python-zope-schema
  2011. (package
  2012. (name "python-zope-schema")
  2013. (version "6.0.0")
  2014. (source
  2015. (origin
  2016. (method url-fetch)
  2017. (uri (pypi-uri "zope.schema" version))
  2018. (sha256
  2019. (base32
  2020. "09jg47bxhfg1ahr1jxb5y0cbiszyk1j6fn1r1r7s6svjl3lbryr0"))))
  2021. (build-system python-build-system)
  2022. (arguments
  2023. `(#:phases
  2024. (modify-phases %standard-phases
  2025. (replace 'check
  2026. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  2027. (add-installed-pythonpath inputs outputs)
  2028. (if tests?
  2029. (invoke "zope-testrunner" "--test-path=src")
  2030. #t))))))
  2031. (propagated-inputs
  2032. (list python-zope-event python-zope-interface))
  2033. (native-inputs
  2034. (list python-zope-i18nmessageid python-zope-testing
  2035. python-zope-testrunner))
  2036. (home-page "https://pypi.org/project/zope.schema/")
  2037. (synopsis "Zope data schemas")
  2038. (description "Zope.scheme provides extensions to zope.interface for
  2039. defining data schemas.")
  2040. (license license:zpl2.1)))
  2041. (define-public python2-zope-schema
  2042. (package-with-python2 python-zope-schema))
  2043. (define-public python-zope-configuration
  2044. (package
  2045. (name "python-zope-configuration")
  2046. (version "4.4.0")
  2047. (source (origin
  2048. (method url-fetch)
  2049. (uri (pypi-uri "zope.configuration" version))
  2050. (sha256
  2051. (base32
  2052. "0g6vrl7y27z9cj5xyrww9xlzk4npj55mgmlrcd9d2nj08jn2pw79"))))
  2053. (build-system python-build-system)
  2054. (native-inputs
  2055. (list python-manuel python-zope-testing python-zope-testrunner))
  2056. (propagated-inputs
  2057. (list python-zope-i18nmessageid python-zope-interface
  2058. python-zope-schema))
  2059. (home-page "https://pypi.org/project/zope.configuration/")
  2060. (synopsis "Zope Configuration Markup Language")
  2061. (description "Zope.configuration implements ZCML, the Zope Configuration
  2062. Markup Language.")
  2063. (license license:zpl2.1)))
  2064. (define-public python-zope-configuration-bootstrap
  2065. (python-zope-bootstrap-package python-zope-configuration))
  2066. (define-public python2-zope-configuration
  2067. (package-with-python2 python-zope-configuration))
  2068. (define-public python-zope-copy
  2069. (package
  2070. (name "python-zope-copy")
  2071. (version "4.2")
  2072. (source
  2073. (origin
  2074. (method url-fetch)
  2075. (uri (pypi-uri "zope.copy" version))
  2076. (sha256
  2077. (base32
  2078. "06m75434krl57n6p73c2qj55k5i3fixg887j8ss01ih6zw4rvfs7"))))
  2079. (build-system python-build-system)
  2080. (arguments
  2081. '(#:phases
  2082. (modify-phases %standard-phases
  2083. (replace 'check
  2084. (lambda _
  2085. (invoke "zope-testrunner" "--test-path=src" "\\[]"))))))
  2086. (propagated-inputs
  2087. (list python-zope-interface))
  2088. (native-inputs
  2089. `(("python-zope-component" ,python-zope-component-bootstrap)
  2090. ("python-zope-location" ,python-zope-location-bootstrap)
  2091. ("python-zope-testing" ,python-zope-testing)
  2092. ("python-zope-testrunner" ,python-zope-testrunner)))
  2093. (home-page "https://github.com/zopefoundation/zope.copy")
  2094. (synopsis "Pluggable object copying mechanism")
  2095. (description
  2096. "This package provides a pluggable mechanism for copying persistent objects.")
  2097. (license license:zpl2.1)))
  2098. (define-public python-zope-proxy
  2099. (package
  2100. (name "python-zope-proxy")
  2101. (version "4.3.5")
  2102. (source
  2103. (origin
  2104. (method url-fetch)
  2105. (uri (pypi-uri "zope.proxy" version))
  2106. (sha256
  2107. (base32
  2108. "14h7nyfbl5vpfk0rbviy4ygdfx0yx5kncvg6jpbdb0dhwna0ssm6"))))
  2109. (build-system python-build-system)
  2110. (native-inputs
  2111. (list python-zope-security-bootstrap python-zope-testrunner))
  2112. (propagated-inputs
  2113. (list python-zope-interface))
  2114. (home-page "https://pypi.org/project/zope.proxy/")
  2115. (synopsis "Generic, transparent proxies")
  2116. (description "Zope.proxy provides generic, transparent proxies for Python.
  2117. Proxies are special objects which serve as mostly-transparent wrappers around
  2118. another object, intervening in the apparent behavior of the wrapped object
  2119. only when necessary to apply the policy (e.g., access checking, location
  2120. brokering, etc.) for which the proxy is responsible.")
  2121. (license license:zpl2.1)))
  2122. (define-public python-zope-proxy-bootstrap
  2123. (python-zope-bootstrap-package python-zope-proxy))
  2124. (define-public python2-zope-proxy
  2125. (package-with-python2 python-zope-proxy))
  2126. (define-public python-zope-hookable
  2127. (package
  2128. (name "python-zope-hookable")
  2129. (version "5.0.1")
  2130. (source
  2131. (origin
  2132. (method url-fetch)
  2133. (uri (pypi-uri "zope.hookable" version))
  2134. (sha256
  2135. (base32
  2136. "0hc82lfr7bk53nvbxvjkibkarngyrzgfk2i6bg8wshl0ly0pdl19"))))
  2137. (build-system python-build-system)
  2138. (native-inputs
  2139. (list python-coverage python-zope-testing))
  2140. (home-page "https://github.com/zopefoundation/zope.hookable")
  2141. (synopsis "Zope hookable")
  2142. (description "This package supports the efficient creation of hookable
  2143. objects, which are callable objects that are meant to be optionally replaced.
  2144. The idea is that you create a function that does some default thing and make i
  2145. hookable. Later, someone can modify what it does by calling its sethook method
  2146. and changing its implementation. All users of the function, including those
  2147. that imported it, will see the change.")
  2148. (license license:zpl2.1)))
  2149. (define-public python-zope-location
  2150. (package
  2151. (name "python-zope-location")
  2152. (version "4.2")
  2153. (source
  2154. (origin
  2155. (method url-fetch)
  2156. (uri (pypi-uri "zope.location" version))
  2157. (sha256
  2158. (base32
  2159. "1b40pzl8v00d583d3gsxv1qjdw2dhghlgkbgxl3m07d5r3izj857"))))
  2160. (build-system python-build-system)
  2161. (arguments
  2162. '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
  2163. (native-inputs
  2164. (list python-zope-testrunner))
  2165. (propagated-inputs
  2166. (list python-zope-interface python-zope-proxy python-zope-schema))
  2167. (home-page "https://pypi.org/project/zope.location/")
  2168. (synopsis "Zope location library")
  2169. (description "Zope.location implements the concept of \"locations\" in
  2170. Zope3, which are are special objects that have a structural location.")
  2171. (license license:zpl2.1)))
  2172. (define-public python-zope-location-bootstrap
  2173. (python-zope-bootstrap-package python-zope-location))
  2174. (define-public python2-zope-location
  2175. (package-with-python2 python-zope-location))
  2176. (define-public python-zope-security
  2177. (package
  2178. (name "python-zope-security")
  2179. (version "5.1.1")
  2180. (source
  2181. (origin
  2182. (method url-fetch)
  2183. (uri (pypi-uri "zope.security" version))
  2184. (sha256
  2185. (base32
  2186. "11lfw67cigscfax9c5j63xcvz2qcj724zx5fcdqyc94am2glim0h"))))
  2187. (build-system python-build-system)
  2188. (propagated-inputs
  2189. (list python-zope-component
  2190. python-zope-i18nmessageid
  2191. python-zope-interface
  2192. python-zope-location
  2193. python-zope-proxy
  2194. python-zope-schema))
  2195. (native-inputs
  2196. (list python-btrees
  2197. python-zope-component-bootstrap
  2198. python-zope-configuration-bootstrap
  2199. python-zope-location-bootstrap
  2200. python-zope-testing
  2201. python-zope-testrunner))
  2202. (home-page "https://pypi.org/project/zope.security/")
  2203. (synopsis "Zope security framework")
  2204. (description "Zope.security provides a generic mechanism to implement
  2205. security policies on Python objects.")
  2206. (license license:zpl2.1)))
  2207. (define-public python-zope-security-bootstrap
  2208. (package
  2209. (inherit (python-zope-bootstrap-package python-zope-security))
  2210. (propagated-inputs
  2211. `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
  2212. ("python-zope-interface" ,python-zope-interface)
  2213. ("python-zope-proxy" ,python-zope-proxy-bootstrap)
  2214. ("python-zope-schema" ,python-zope-schema)))))
  2215. (define-public python2-zope-security
  2216. (package-with-python2 python-zope-security))
  2217. (define-public python-zope-component
  2218. (package
  2219. (name "python-zope-component")
  2220. (version "4.6.2")
  2221. (source
  2222. (origin
  2223. (method url-fetch)
  2224. (uri (pypi-uri "zope.component" version))
  2225. (sha256
  2226. (base32
  2227. "14iwp95hh6q5dj4k9h1iw75cbp89bs27nany4dinyglb44c8jqli"))))
  2228. (build-system python-build-system)
  2229. (arguments
  2230. '(#:phases
  2231. (modify-phases %standard-phases
  2232. (replace 'check
  2233. (lambda* (#:key tests? #:allow-other-keys)
  2234. (if tests?
  2235. (invoke "python" "setup.py" "test")
  2236. (format #t "test suite not run~%")))))))
  2237. (native-inputs
  2238. `(("python-persistent" ,python-persistent)
  2239. ("python-zope-configuration" ,python-zope-configuration-bootstrap)
  2240. ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
  2241. ("python-zope-location" ,python-zope-location-bootstrap)
  2242. ("python-zope-proxy" ,python-zope-proxy-bootstrap)
  2243. ("python-zope-security" ,python-zope-security-bootstrap)
  2244. ("python-zope-testing" ,python-zope-testing)
  2245. ("python-zope-testrunner" ,python-zope-testrunner)))
  2246. (propagated-inputs
  2247. (list python-zope-deferredimport python-zope-deprecation
  2248. python-zope-event python-zope-hookable python-zope-interface))
  2249. (home-page "https://github.com/zopefoundation/zope.component")
  2250. (synopsis "Zope Component Architecture")
  2251. (description "Zope.component represents the core of the Zope Component
  2252. Architecture. Together with the zope.interface package, it provides
  2253. facilities for defining, registering and looking up components.")
  2254. (license license:zpl2.1)))
  2255. (define-public python-zope-component-bootstrap
  2256. (python-zope-bootstrap-package python-zope-component))
  2257. (define-public python2-zope-component
  2258. (package-with-python2 python-zope-component))
  2259. (define-public python-zope-deferredimport
  2260. (package
  2261. (name "python-zope-deferredimport")
  2262. (version "4.3.1")
  2263. (source
  2264. (origin
  2265. (method url-fetch)
  2266. (uri (pypi-uri "zope.deferredimport" version))
  2267. (sha256
  2268. (base32
  2269. "1q89v54dwniiqypjbwywwdfjdr4kdkqlyqsgrpplgvsygdg39cjp"))))
  2270. (build-system python-build-system)
  2271. (propagated-inputs
  2272. (list python-zope-proxy))
  2273. (native-inputs
  2274. (list python-zope-testrunner))
  2275. (home-page "https://github.com/zopefoundation/zope.deferredimport")
  2276. (synopsis "Defer imports until used by code")
  2277. (description
  2278. "Often, especially for package modules, you want to import names for
  2279. convenience, but not actually perform the imports until necessary. The
  2280. @code{zope.deferredimport} package provided facilities for defining names in
  2281. modules that will be imported from somewhere else when used. You can also cause
  2282. deprecation warnings to be issued when a variable is used.")
  2283. (license license:zpl2.1)))
  2284. (define-public python-ndg-httpsclient
  2285. (package
  2286. (name "python-ndg-httpsclient")
  2287. (version "0.5.1")
  2288. (source (origin
  2289. (method url-fetch)
  2290. (uri (pypi-uri "ndg_httpsclient" version))
  2291. (sha256
  2292. (base32
  2293. "0412b7i1s4vj7lz9r72nmb28h9syd4q2x89bdirkkc3a6z8awbyp"))))
  2294. (build-system python-build-system)
  2295. (arguments
  2296. '(;; The tests appear to require networking.
  2297. #:tests? #f))
  2298. (propagated-inputs
  2299. (list python-pyasn1 python-pyopenssl))
  2300. (synopsis "HTTPS support for Python's httplib and urllib2")
  2301. (description "This is a HTTPS client implementation for httplib and urllib2
  2302. based on PyOpenSSL. PyOpenSSL provides a more fully-featured SSL implementation
  2303. over the default provided with Python and, importantly, enables full
  2304. verification of the SSL peer.")
  2305. (home-page "https://github.com/cedadev/ndg_httpsclient/")
  2306. (license license:bsd-3)))
  2307. (define-public python-websocket-client
  2308. (package
  2309. (name "python-websocket-client")
  2310. (version "1.2.3")
  2311. (source
  2312. (origin
  2313. (method url-fetch)
  2314. (uri (pypi-uri "websocket-client" version))
  2315. (sha256
  2316. (base32 "1xba9z6b211pandrlk2l5p8wj6gn7yfkpq1sxfbqjl6c19n8258k"))))
  2317. (build-system python-build-system)
  2318. (arguments
  2319. `(#:phases
  2320. (modify-phases %standard-phases
  2321. (add-after 'unpack 'skip-network-test
  2322. (lambda _
  2323. ;; This test requires networking.
  2324. (substitute* "websocket/tests/test_http.py"
  2325. (("def testConnect") "def _testConnect"))))
  2326. (replace 'check
  2327. (lambda* (#:key tests? #:allow-other-keys)
  2328. (when tests?
  2329. (invoke "pytest" "-vv" "websocket/tests")))))))
  2330. (native-inputs
  2331. (list python-pysocks python-pytest python-websockets))
  2332. (home-page "https://github.com/websocket-client/websocket-client")
  2333. (synopsis "WebSocket client for Python")
  2334. (description "The Websocket-client module provides the low level APIs for
  2335. WebSocket usage in Python programs.")
  2336. (license license:lgpl2.1+)))
  2337. (define-public python-websocket-client-0.59
  2338. (package
  2339. (inherit python-websocket-client)
  2340. (version "0.59.0")
  2341. (source
  2342. (origin
  2343. (method url-fetch)
  2344. (uri (pypi-uri "websocket-client" version))
  2345. (sha256
  2346. (base32 "0p0cz2mdissq7iw1n7jrmsfir0jfmgs1dvnpnrx477ffx9hbsxnk"))))))
  2347. (define-public python-purl
  2348. (package
  2349. (name "python-purl")
  2350. (version "1.5")
  2351. (source
  2352. (origin
  2353. (method url-fetch)
  2354. (uri (pypi-uri "purl" version))
  2355. (sha256
  2356. (base32
  2357. "15ibnz1xrh5msmn04j0nr00sz4n7jwx6cwd6zlx99kkz3vpin53m"))))
  2358. (build-system python-build-system)
  2359. (propagated-inputs (list python-six))
  2360. (home-page
  2361. "https://github.com/codeinthehole/purl")
  2362. (synopsis
  2363. "Python package for URL manipulation")
  2364. (description
  2365. "Purl is a Python package for handling URLs.")
  2366. (license license:expat)))
  2367. (define-public python-apiron
  2368. (package
  2369. (name "python-apiron")
  2370. (version "5.1.0")
  2371. (source
  2372. (origin
  2373. (method url-fetch)
  2374. (uri (pypi-uri "apiron" version))
  2375. (sha256
  2376. (base32 "1qwbqn47sf0aqznj1snbv37v8ijx476qqkjf5l9pac7xjkxsr8qk"))))
  2377. (build-system python-build-system)
  2378. (arguments
  2379. `(#:phases
  2380. (modify-phases %standard-phases
  2381. (replace 'check
  2382. (lambda* (#:key inputs outputs #:allow-other-keys)
  2383. (add-installed-pythonpath inputs outputs)
  2384. (invoke "pytest" "-vv" "--cov" "-k"
  2385. ;; This test tries to connect to the internet.
  2386. "not test_call"))))))
  2387. (propagated-inputs
  2388. (list python-requests))
  2389. (native-inputs
  2390. (list python-pytest python-pytest-cov))
  2391. (home-page "https://github.com/ithaka/apiron")
  2392. (synopsis "Python wrapper for interacting with RESTful APIs")
  2393. (description
  2394. "@code{apiron} provides a declarative, structured configuration of
  2395. services and endpoints with a unified interface for interacting with RESTful
  2396. APIs.")
  2397. (license license:expat)))
  2398. (define-public python-beren
  2399. (package
  2400. (name "python-beren")
  2401. (version "0.7.0")
  2402. (source
  2403. (origin
  2404. (method url-fetch)
  2405. (uri (pypi-uri "beren" version))
  2406. (sha256
  2407. (base32 "1v3mdwfqsyza892zvs124ym9w1bkng1j56b7l4dwfjir3723xcgf"))))
  2408. (build-system python-build-system)
  2409. (arguments
  2410. ;; The test tries to open a connection to a remote server.
  2411. `(#:tests? #f))
  2412. (propagated-inputs
  2413. (list python-apiron))
  2414. (home-page "https://github.com/teffalump/beren")
  2415. (synopsis "REST client for Orthanc DICOM servers")
  2416. (description
  2417. "@code{beren} provides a REST client for Orthanc, a DICOM server.")
  2418. (license license:gpl3+)))
  2419. (define-public python-requests
  2420. (package
  2421. (name "python-requests")
  2422. (version "2.26.0")
  2423. (source (origin
  2424. (method url-fetch)
  2425. (uri (pypi-uri "requests" version))
  2426. (sha256
  2427. (base32
  2428. "19q73fq7hip7b74fwls3p9x6zwvfwqcwpn6kha3zsgvrrzw5iamq"))))
  2429. (build-system python-build-system)
  2430. (propagated-inputs
  2431. (list python-certifi python-chardet python-charset-normalizer
  2432. python-idna python-urllib3))
  2433. (arguments
  2434. ;; FIXME: Some tests require network access.
  2435. '(#:tests? #f))
  2436. (home-page "http://python-requests.org/")
  2437. (synopsis "Python HTTP library")
  2438. (description
  2439. "Requests is a Python HTTP client library. It aims to be easier to use
  2440. than Python’s urllib2 library.")
  2441. (license license:asl2.0)
  2442. (properties `((python2-variant . ,(delay python2-requests))))))
  2443. (define-public python2-requests
  2444. (let ((base (package-with-python2 (strip-python2-variant python-requests))))
  2445. (package
  2446. (inherit base)
  2447. ;; The python-charset-normalizer dependency is necessary on Python 3
  2448. ;; only.
  2449. (propagated-inputs (modify-inputs (package-propagated-inputs base)
  2450. (delete "python-charset-normalizer"))))))
  2451. (define-public python-requests-unixsocket
  2452. (package
  2453. (name "python-requests-unixsocket")
  2454. (version "0.2.0")
  2455. (source
  2456. (origin
  2457. (method url-fetch)
  2458. (uri (pypi-uri "requests-unixsocket" version))
  2459. (sha256
  2460. (base32
  2461. "1sn12y4fw1qki5gxy9wg45gmdrxhrndwfndfjxhpiky3mwh1lp4y"))))
  2462. (build-system python-build-system)
  2463. (arguments
  2464. '(#:phases
  2465. (modify-phases %standard-phases
  2466. (add-after 'unpack 'relax-requirements
  2467. (lambda _
  2468. (substitute* "test-requirements.txt"
  2469. (("(.*)==(.*)" _ name) (string-append name "\n")))))
  2470. (replace 'check
  2471. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  2472. ;; Avoid a deprecation error.
  2473. (substitute* "pytest.ini"
  2474. (("--pep8") ""))
  2475. (when tests?
  2476. (add-installed-pythonpath inputs outputs)
  2477. (invoke "pytest" "-vv")))))))
  2478. (propagated-inputs
  2479. (list python-pbr python-requests python-urllib3))
  2480. (native-inputs
  2481. (list python-apipkg
  2482. python-appdirs
  2483. python-execnet
  2484. python-packaging
  2485. python-pep8
  2486. python-py
  2487. python-pyparsing
  2488. python-pytest
  2489. python-pytest-cache
  2490. python-pytest-pep8
  2491. python-six
  2492. python-waitress))
  2493. (home-page "https://github.com/msabramo/requests-unixsocket")
  2494. (synopsis "Talk HTTP via a UNIX domain socket")
  2495. (description
  2496. "This Python package lets you use the @code{requests} library to talk
  2497. HTTP via a UNIX domain socket.")
  2498. (license license:asl2.0)))
  2499. (define-public python-requests_ntlm
  2500. (package
  2501. (name "python-requests_ntlm")
  2502. (version "1.1.0")
  2503. (source
  2504. (origin
  2505. (method url-fetch)
  2506. (uri (pypi-uri "requests_ntlm" version))
  2507. (sha256
  2508. (base32
  2509. "0wgbqzaq9w7bas16b7brdb75f91bh3275fb459093bk1ihpck2ci"))))
  2510. (build-system python-build-system)
  2511. (propagated-inputs
  2512. (list python-cryptography python-ntlm-auth python-requests))
  2513. (home-page "https://github.com/requests/requests-ntlm")
  2514. (synopsis
  2515. "NTLM authentication support for Requests")
  2516. (description
  2517. "This package allows for HTTP NTLM authentication using the requests
  2518. library.")
  2519. (license license:isc)))
  2520. (define-public python-requests-mock
  2521. (package
  2522. (name "python-requests-mock")
  2523. (version "1.8.0")
  2524. (source
  2525. (origin
  2526. (method url-fetch)
  2527. (uri (pypi-uri "requests-mock" version))
  2528. (sha256
  2529. (base32
  2530. "09nj8fmyj7xz2mgwyvbw0fl9zybmx2d3qd2hf529vvjc9s24d3z6"))))
  2531. (build-system python-build-system)
  2532. (propagated-inputs
  2533. (list python-requests python-six))
  2534. (native-inputs
  2535. (list python-pbr
  2536. python-discover
  2537. python-docutils
  2538. python-fixtures
  2539. python-mock
  2540. python-purl
  2541. python-pytest
  2542. python-sphinx
  2543. python-testrepository))
  2544. (home-page "https://requests-mock.readthedocs.org/")
  2545. (synopsis "Mock out responses from the requests package")
  2546. (description
  2547. "This module provides a building block to stub out the HTTP requests
  2548. portions of your testing code.")
  2549. (license license:asl2.0)))
  2550. (define-public python-requests-toolbelt
  2551. (package
  2552. (name "python-requests-toolbelt")
  2553. (version "0.9.1")
  2554. (source (origin
  2555. (method url-fetch)
  2556. (uri (pypi-uri "requests-toolbelt" version))
  2557. (sha256
  2558. (base32
  2559. "1h3gm88dcjbd7gm229a7x5qkkhnsqsjz0m0l2xyavm2ab3a8k04n"))))
  2560. (build-system python-build-system)
  2561. (arguments
  2562. '(#:phases (modify-phases %standard-phases
  2563. (add-after 'unpack 'delete-problematic-tests
  2564. (lambda _
  2565. ;; Fails because of expired certificate.
  2566. (delete-file "tests/test_x509_adapter.py")
  2567. ;; Fails due to networking (socket.gaierror: [Errno -2]
  2568. ;; Name or service not known).
  2569. (delete-file "tests/test_multipart_encoder.py"))))))
  2570. (native-inputs
  2571. (list python-betamax python-mock python-pytest))
  2572. (propagated-inputs
  2573. (list python-requests))
  2574. (synopsis "Extensions to python-requests")
  2575. (description "This is a toolbelt of useful classes and functions to be used
  2576. with python-requests.")
  2577. (home-page "https://github.com/requests/toolbelt/")
  2578. (license license:asl2.0)))
  2579. (define-public python-requests-ftp
  2580. (package
  2581. (name "python-requests-ftp")
  2582. (version "0.3.1")
  2583. (source
  2584. (origin
  2585. (method url-fetch)
  2586. (uri (pypi-uri "requests-ftp" version))
  2587. (sha256
  2588. (base32
  2589. "0yh5v21v36dsjsgv4y9dx4mmz35741l5jf6pbq9w19d8rfsww13m"))))
  2590. (build-system python-build-system)
  2591. (propagated-inputs
  2592. (list python-requests))
  2593. (home-page
  2594. "https://github.com/Lukasa/requests-ftp")
  2595. (synopsis "FTP Transport Adapter for Requests")
  2596. (description
  2597. "Requests-FTP is an implementation of a simple FTP transport
  2598. adapter for use with the Requests library.")
  2599. (license license:asl2.0)))
  2600. (define-public python-oauthlib
  2601. (package
  2602. (name "python-oauthlib")
  2603. (version "3.1.0")
  2604. (source (origin
  2605. (method url-fetch)
  2606. (uri (pypi-uri "oauthlib" version))
  2607. (sha256
  2608. (base32
  2609. "12gqnabwck30gdlpwm6af3s28qm9p2yc7b1w8s4fk9ncbz1irr5y"))))
  2610. (build-system python-build-system)
  2611. (arguments
  2612. `(#:phases (modify-phases %standard-phases
  2613. (replace 'check
  2614. (lambda _
  2615. (invoke "pytest" "-vv"))))))
  2616. (native-inputs
  2617. (list python-pytest python-pytest-cov python-mock))
  2618. (propagated-inputs
  2619. (list python-cryptography python-pyjwt python-blinker))
  2620. (home-page "https://github.com/oauthlib/oauthlib")
  2621. (synopsis "OAuth implementation for Python")
  2622. (description
  2623. "Oauthlib is a generic, spec-compliant, thorough implementation of the
  2624. OAuth request-signing logic.")
  2625. (license license:bsd-3)))
  2626. (define-public python2-oauthlib
  2627. (package-with-python2 python-oauthlib))
  2628. (define-public python-rauth
  2629. (package
  2630. (name "python-rauth")
  2631. (version "0.7.3")
  2632. (source
  2633. (origin
  2634. (method url-fetch)
  2635. (uri (pypi-uri "rauth" version))
  2636. (sha256
  2637. (base32
  2638. "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
  2639. (build-system python-build-system)
  2640. (arguments
  2641. `(#:test-target "check"))
  2642. (propagated-inputs
  2643. (list python-requests))
  2644. (home-page "https://github.com/litl/rauth")
  2645. (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
  2646. (description
  2647. "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
  2648. provides service wrappers for convenient connection initialization and
  2649. authenticated session objects providing things like keep-alive.")
  2650. (license license:expat)
  2651. (properties `((python2-variant . ,(delay python2-rauth))))))
  2652. (define-public python2-rauth
  2653. (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
  2654. (package/inherit base
  2655. (native-inputs `(("python2-unittest2" ,python2-unittest2)
  2656. ,@(package-native-inputs base))))))
  2657. (define-public python-unalix
  2658. (package
  2659. (name "python-unalix")
  2660. (version "0.9")
  2661. (source
  2662. (origin
  2663. ;; There's only a wheel on PyPI.
  2664. (method git-fetch)
  2665. (uri (git-reference
  2666. (url "https://github.com/AmanoTeam/Unalix")
  2667. (commit (string-append "v" version))))
  2668. (file-name (git-file-name name version))
  2669. (sha256
  2670. (base32 "0h8wc1axv26h753a8brc6dccqndx005c2bhr09gwg5c1hj9zsfml"))))
  2671. (build-system python-build-system)
  2672. (native-inputs (list python-pytest))
  2673. (arguments
  2674. '(#:phases
  2675. (modify-phases %standard-phases
  2676. (replace 'check
  2677. (lambda* (#:key tests? #:allow-other-keys)
  2678. (when tests?
  2679. (invoke "pytest")))))))
  2680. (home-page "https://pypi.org/project/Unalix/")
  2681. (synopsis "Python library for removing tracking fields from URLs")
  2682. (description "Unalix is a library written in Python implementing the
  2683. specification used by the @url{https://github.com/ClearURLs/Addon, ClearURLs}
  2684. addon for removing tracking fields from URLs.")
  2685. (license license:lgpl3+)))
  2686. (define-public python-urllib3
  2687. (package
  2688. (name "python-urllib3")
  2689. (version "1.26.7")
  2690. (source
  2691. (origin
  2692. (method url-fetch)
  2693. (uri (pypi-uri "urllib3" version))
  2694. (sha256
  2695. (base32
  2696. "1kkf6gi8a1fs0dqkf6kpmdpsy97iirvliz8q1krxp8ppaiawd1s9"))))
  2697. (build-system python-build-system)
  2698. (arguments `(#:tests? #f))
  2699. (propagated-inputs
  2700. (list ;; These 5 inputs are used to build urrlib3[secure]
  2701. python-certifi
  2702. python-cryptography
  2703. python-idna
  2704. python-pyopenssl
  2705. python-pysocks))
  2706. (home-page "https://urllib3.readthedocs.io/")
  2707. (synopsis "HTTP library with thread-safe connection pooling")
  2708. (description
  2709. "Urllib3 supports features left out of urllib and urllib2 libraries. It
  2710. can reuse the same socket connection for multiple requests, it can POST files,
  2711. supports url redirection and retries, and also gzip and deflate decoding.")
  2712. (properties `((python2-variant . ,(delay python2-urllib3))))
  2713. (license license:expat)))
  2714. (define-public python2-urllib3
  2715. (let ((base (package-with-python2 (strip-python2-variant python-urllib3))))
  2716. (package/inherit
  2717. base
  2718. (propagated-inputs
  2719. `(("python-ipaddress" ,python2-ipaddress)
  2720. ,@(package-propagated-inputs base))))))
  2721. (define-public awscli
  2722. (package
  2723. ;; Note: updating awscli typically requires updating botocore as well.
  2724. (name "awscli")
  2725. (version "1.21.11")
  2726. (source
  2727. (origin
  2728. (method url-fetch)
  2729. (uri (pypi-uri name version))
  2730. (sha256
  2731. (base32
  2732. "0fkivwbx4nind5b7l4jhqm5bb9drgqsclcslrg4aggf9rcs4g4s0"))))
  2733. (build-system python-build-system)
  2734. (arguments
  2735. ;; FIXME: The 'pypi' release does not contain tests.
  2736. '(#:tests? #f
  2737. #:phases
  2738. (modify-phases %standard-phases
  2739. (add-after 'unpack 'fix-reference-to-groff
  2740. (lambda _
  2741. (substitute* "awscli/help.py"
  2742. (("if not self._exists_on_path\\('groff'\\):") "")
  2743. (("raise ExecutableNotFoundError\\('groff'\\)") "")
  2744. (("cmdline = \\['groff'")
  2745. (string-append "cmdline = ['" (which "groff") "'"))))))))
  2746. (propagated-inputs
  2747. (list python-colorama-for-awscli
  2748. python-botocore
  2749. python-s3transfer
  2750. python-docutils-0.15
  2751. python-pyyaml
  2752. python-rsa))
  2753. (native-inputs
  2754. (list groff))
  2755. (home-page "https://aws.amazon.com/cli/")
  2756. (synopsis "Command line client for AWS")
  2757. (description "AWS CLI provides a unified command line interface to the
  2758. Amazon Web Services (AWS) API.")
  2759. (license license:asl2.0)))
  2760. (define-public python-wsgiproxy2
  2761. (package
  2762. (name "python-wsgiproxy2")
  2763. (version "0.4.6")
  2764. (source
  2765. (origin
  2766. (method url-fetch)
  2767. (uri (pypi-uri "WSGIProxy2" version ".tar.gz"))
  2768. (sha256
  2769. (base32 "16jch5nic0hia28lps3c678s9s9mjdq8n87igxncjg0rpi5adqnf"))))
  2770. (build-system python-build-system)
  2771. (native-inputs
  2772. (list python-webtest))
  2773. (propagated-inputs
  2774. (list python-requests python-six python-urllib3 python-webob))
  2775. (home-page "https://github.com/gawel/WSGIProxy2/")
  2776. (synopsis "WSGI Proxy with various http client backends")
  2777. (description "WSGI turns HTTP requests into WSGI function calls.
  2778. WSGIProxy turns WSGI function calls into HTTP requests.
  2779. It also includes code to sign requests and pass private data,
  2780. and to spawn subprocesses to handle requests.")
  2781. (license license:expat)))
  2782. (define-public python-pastedeploy
  2783. (package
  2784. (name "python-pastedeploy")
  2785. (version "2.1.1")
  2786. (source
  2787. (origin
  2788. (method url-fetch)
  2789. (uri (pypi-uri "PasteDeploy" version))
  2790. (sha256
  2791. (base32 "05s88qdjdwd9d9qs13fap7nqgxs7qs5qfzzjbrc5va13k2mxdskd"))))
  2792. (build-system python-build-system)
  2793. (arguments
  2794. '(#:test-target "pytest"))
  2795. (native-inputs
  2796. (list python-pytest python-pytest-runner))
  2797. (home-page "https://pylonsproject.org/")
  2798. (synopsis
  2799. "Load, configure, and compose WSGI applications and servers")
  2800. (description
  2801. "This tool provides code to load WSGI applications and servers from URIs;
  2802. these URIs can refer to Python Eggs for INI-style configuration files. Paste
  2803. Script provides commands to serve applications based on this configuration
  2804. file.")
  2805. (license license:expat)))
  2806. (define-public python2-pastedeploy
  2807. (package-with-python2 python-pastedeploy))
  2808. (define-public python-webtest
  2809. (package
  2810. (name "python-webtest")
  2811. (version "2.0.35")
  2812. (source
  2813. (origin
  2814. (method url-fetch)
  2815. (uri (pypi-uri "WebTest" version))
  2816. (sha256
  2817. (base32 "11xhgdj251zkvz5w30fvspii08ki2vrpr1im9sph1wmlnasnihda"))))
  2818. (build-system python-build-system)
  2819. (arguments
  2820. ;; Tests require python-pyquery, which creates a circular dependency.
  2821. `(#:tests? #f))
  2822. (propagated-inputs
  2823. (list python-waitress python-webob python-six python-beautifulsoup4))
  2824. (home-page "https://docs.pylonsproject.org/projects/webtest/")
  2825. (synopsis "Helper to test WSGI applications")
  2826. (description "Webtest allows you to test your Python web applications
  2827. without starting an HTTP server. It supports anything that supports the
  2828. minimum of WSGI.")
  2829. (license license:expat)))
  2830. (define-public python-flask
  2831. (package
  2832. (name "python-flask")
  2833. (version "2.0.2")
  2834. (source (origin
  2835. (method url-fetch)
  2836. (uri (pypi-uri "Flask" version))
  2837. (sha256
  2838. (base32
  2839. "1qilnrdakhbw5k951kczdy8ia0wczh0dpp1vi4qhgmfx6klvhbvv"))))
  2840. (build-system python-build-system)
  2841. (arguments
  2842. '(#:phases
  2843. (modify-phases %standard-phases
  2844. (replace 'check
  2845. (lambda* (#:key tests? #:allow-other-keys)
  2846. (when tests?
  2847. (invoke "pytest" "-vv" "tests")))))))
  2848. (native-inputs
  2849. (list python-pytest))
  2850. (propagated-inputs
  2851. (list python-itsdangerous python-jinja2 python-click python-werkzeug))
  2852. (home-page "https://www.palletsprojects.com/p/flask/")
  2853. (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
  2854. (description "Flask is a micro web framework based on the Werkzeug toolkit
  2855. and Jinja2 template engine. It is called a micro framework because it does not
  2856. presume or force a developer to use a particular tool or library.")
  2857. (license license:bsd-3)))
  2858. (define-public python-flask-wtf
  2859. (package
  2860. (name "python-flask-wtf")
  2861. (version "0.14.3")
  2862. (source
  2863. (origin
  2864. (method url-fetch)
  2865. (uri (pypi-uri "Flask-WTF" version))
  2866. (sha256
  2867. (base32
  2868. "086pvg2x69n0nczcq7frknfjd8am1zdy8qqpva1sanwb02hf65yl"))))
  2869. (build-system python-build-system)
  2870. (arguments
  2871. '(#:phases
  2872. (modify-phases %standard-phases
  2873. (replace 'check
  2874. (lambda _
  2875. (invoke "pytest" "-vv"))))))
  2876. (propagated-inputs
  2877. (list python-flask-babel python-babel python-wtforms))
  2878. (native-inputs
  2879. (list python-pytest))
  2880. (home-page "https://github.com/lepture/flask-wtf")
  2881. (synopsis "Simple integration of Flask and WTForms")
  2882. (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
  2883. upload, and reCAPTCHA.")
  2884. (license license:bsd-3)))
  2885. (define-public python-flask-multistatic
  2886. (package
  2887. (name "python-flask-multistatic")
  2888. (version "1.0")
  2889. (source
  2890. (origin
  2891. (method url-fetch)
  2892. (uri (pypi-uri "flask-multistatic" version))
  2893. (sha256
  2894. (base32
  2895. "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
  2896. (build-system python-build-system)
  2897. (propagated-inputs
  2898. (list python-flask))
  2899. (home-page "https://pagure.io/flask-multistatic")
  2900. (synopsis "Flask plugin to allow overriding static files")
  2901. (description "@code{flask-multistatic} is a flask plugin that adds support
  2902. for overriding static files.")
  2903. (license license:gpl3+)))
  2904. (define-public python-cookies
  2905. (package
  2906. (name "python-cookies")
  2907. (version "2.2.1")
  2908. (source (origin
  2909. (method url-fetch)
  2910. (uri (pypi-uri "cookies" version))
  2911. (sha256
  2912. (base32
  2913. "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
  2914. (build-system python-build-system)
  2915. (arguments
  2916. `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
  2917. #:tests? #f))
  2918. (native-inputs
  2919. (list python-pytest))
  2920. (synopsis "HTTP cookie parser and renderer")
  2921. (description "A RFC 6265-compliant HTTP cookie parser and renderer in
  2922. Python.")
  2923. (home-page "https://gitlab.com/sashahart/cookies")
  2924. (license license:expat)))
  2925. (define-public python2-cookies
  2926. (package-with-python2 python-cookies))
  2927. (define-public python-responses
  2928. (package
  2929. (name "python-responses")
  2930. (version "0.10.6")
  2931. (source (origin
  2932. (method url-fetch)
  2933. (uri (pypi-uri "responses" version))
  2934. (sha256
  2935. (base32
  2936. "147pacwkkqy3qf3hr33fnl1xbzgw0zsm3qppvvy9qhq8h069qbah"))))
  2937. (build-system python-build-system)
  2938. (arguments
  2939. `(;; Test suite is not distributed:
  2940. ;; https://github.com/getsentry/responses/issues/38
  2941. #:tests? #f))
  2942. (native-inputs
  2943. (list python-mock))
  2944. (propagated-inputs
  2945. (list python-requests python-cookies python-six))
  2946. (home-page "https://github.com/getsentry/responses")
  2947. (synopsis "Utility for mocking out the `requests` Python library")
  2948. (description "A utility library for mocking out the `requests` Python
  2949. library.")
  2950. (license license:asl2.0)))
  2951. (define-public python2-responses
  2952. (package-with-python2 python-responses))
  2953. (define-public python-grequests
  2954. (package
  2955. (name "python-grequests")
  2956. (version "0.3.0")
  2957. (source
  2958. (origin
  2959. (method url-fetch)
  2960. (uri (pypi-uri "grequests" version))
  2961. (sha256
  2962. (base32
  2963. "1j9icncllbkv7x5719b20mx670c6q1jrdx1sakskkarvx3pc8h8g"))))
  2964. (build-system python-build-system)
  2965. (propagated-inputs
  2966. (list python-gevent python-requests))
  2967. (native-inputs
  2968. (list python-nose python-zope-interface python-zope-event))
  2969. (home-page "https://github.com/kennethreitz/grequests")
  2970. (synopsis "Python library for asynchronous HTTP requests")
  2971. (description "GRequests is a Python library that allows you to use
  2972. @code{Requests} with @code{Gevent} to make asynchronous HTTP Requests easily")
  2973. (license license:bsd-2)))
  2974. (define-public python-dpkt
  2975. (package
  2976. (name "python-dpkt")
  2977. (version "1.9.4")
  2978. (source
  2979. (origin
  2980. (method url-fetch)
  2981. (uri (pypi-uri "dpkt" version))
  2982. (sha256
  2983. (base32
  2984. "1d28r8pmhzjjd6hrn1xcddinfhwv8lcl1s59ygmqa8kfmz5pkrgl"))))
  2985. (build-system python-build-system)
  2986. (home-page "https://github.com/kbandla/dpkt")
  2987. (synopsis "Packet generator and parser for TCP/IP protocols")
  2988. (description "The dpkt module is a fast, simple packet generator and parser
  2989. for the basic TCP/IP protocols.")
  2990. (license license:bsd-3)))
  2991. (define-public python-geventhttpclient
  2992. (package
  2993. (name "python-geventhttpclient")
  2994. (version "1.5.3")
  2995. (source (origin
  2996. (method url-fetch)
  2997. (uri (pypi-uri "geventhttpclient" version))
  2998. (sha256
  2999. (base32
  3000. "104p14p67xa5gch8dy2zqmzmjra31fflk1c1alrry8dp8bzwj3nq"))
  3001. (modules '((guix build utils)))
  3002. (snippet
  3003. '(begin
  3004. ;; Delete pre-compiled files.
  3005. (for-each delete-file (find-files "src/geventhttpclient"
  3006. ".*\\.pyc"))))))
  3007. (build-system python-build-system)
  3008. (arguments
  3009. '(#:phases
  3010. (modify-phases %standard-phases
  3011. (add-after 'unpack 'delete-network-tests
  3012. (lambda _
  3013. (delete-file "src/geventhttpclient/tests/test_client.py")))
  3014. (add-after 'unpack 'fix-compatibility-issue
  3015. ;; See: https://github.com/gwik/geventhttpclient/issues/137.
  3016. (lambda _
  3017. (substitute* "src/geventhttpclient/tests/test_ssl.py"
  3018. ((".*sock.last_seen_sni = None.*")
  3019. ""))))
  3020. (replace 'check
  3021. (lambda* (#:key tests? #:allow-other-keys)
  3022. (when tests?
  3023. (invoke "pytest" "src/geventhttpclient/tests" "-v"
  3024. ;; Append the test modules to sys.path to avoid
  3025. ;; namespace conflict which breaks SSL tests.
  3026. "--import-mode=append")))))))
  3027. (native-inputs
  3028. (list python-dpkt python-pytest))
  3029. (propagated-inputs
  3030. (list python-brotli python-certifi python-gevent python-six))
  3031. (home-page "https://github.com/gwik/geventhttpclient")
  3032. (synopsis "HTTP client library for gevent")
  3033. (description "@code{python-geventhttpclient} is a high performance,
  3034. concurrent HTTP client library for python using @code{gevent}.")
  3035. (license license:expat)))
  3036. (define-public python-requests-oauthlib
  3037. (package
  3038. (name "python-requests-oauthlib")
  3039. (version "1.2.0")
  3040. (source
  3041. (origin
  3042. (method url-fetch)
  3043. (uri (pypi-uri "requests-oauthlib" version))
  3044. (sha256
  3045. (base32
  3046. "0mrglgcvq7k48pf27s4gifdk0za8xmgpf55jy15yjj471qrk6rdx"))))
  3047. (build-system python-build-system)
  3048. (arguments
  3049. `(#:phases
  3050. (modify-phases %standard-phases
  3051. ;; removes tests that require network access
  3052. (add-before 'check 'pre-check
  3053. (lambda _
  3054. (delete-file "tests/test_core.py")
  3055. #t)))))
  3056. (native-inputs
  3057. (list python-pyjwt python-requests-mock python-mock))
  3058. (propagated-inputs
  3059. (list python-oauthlib python-requests))
  3060. (home-page
  3061. "https://github.com/requests/requests-oauthlib")
  3062. (synopsis
  3063. "OAuthlib authentication support for Requests")
  3064. (description
  3065. "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
  3066. provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
  3067. (license license:isc)))
  3068. (define-public python-url
  3069. (package
  3070. (name "python-url")
  3071. (version "0.2.0")
  3072. (source (origin
  3073. (method url-fetch)
  3074. (uri (pypi-uri "url" version))
  3075. (sha256
  3076. (base32
  3077. "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
  3078. (build-system python-build-system)
  3079. (propagated-inputs
  3080. (list python-publicsuffix))
  3081. (native-inputs
  3082. (list python-coverage python-nose))
  3083. (arguments
  3084. `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
  3085. (home-page "https://github.com/seomoz/url-py")
  3086. (synopsis "URL Parsing")
  3087. (description "Library for parsing urls.")
  3088. (license license:expat)))
  3089. (define-public python-cachecontrol
  3090. (package
  3091. (name "python-cachecontrol")
  3092. (version "0.12.10")
  3093. (source
  3094. (origin
  3095. (method git-fetch)
  3096. ;; Pypi does not have tests.
  3097. (uri (git-reference
  3098. (url "https://github.com/ionrock/cachecontrol")
  3099. (commit (string-append "v" version))))
  3100. (file-name (git-file-name name version))
  3101. (sha256
  3102. (base32
  3103. "0fviacb13h72l5c77p35lgr6kvlidfdb9xsicg3v6lblmp9cn2ws"))))
  3104. (build-system python-build-system)
  3105. (arguments
  3106. ;; Versions > 0.11.6 depend on CherryPy for testing.
  3107. ;; It's too much work to package CherryPy for now.
  3108. `(#:tests? #f))
  3109. (propagated-inputs
  3110. (list python-requests python-msgpack python-lockfile))
  3111. (home-page "https://github.com/ionrock/cachecontrol")
  3112. (synopsis "The httplib2 caching algorithms for use with requests")
  3113. (description "CacheControl is a port of the caching algorithms in
  3114. @code{httplib2} for use with @code{requests} session objects.")
  3115. (license license:asl2.0)))
  3116. (define-public python-cachecontrol-0.11
  3117. (package
  3118. (inherit python-cachecontrol)
  3119. (name "python-cachecontrol")
  3120. (version "0.11.7")
  3121. (source
  3122. (origin
  3123. (method url-fetch)
  3124. (uri (pypi-uri "CacheControl" version))
  3125. (sha256
  3126. (base32
  3127. "07jsfhlbcwgqg6ayz8nznzaqg5rmxqblbzxz1qvg5wc44pcjjy4g"))))))
  3128. (define-public python-betamax
  3129. (package
  3130. (name "python-betamax")
  3131. (version "0.8.1")
  3132. (source
  3133. (origin
  3134. (method url-fetch)
  3135. (uri (pypi-uri "betamax" version))
  3136. (sha256
  3137. (base32
  3138. "1hki1c2vs7adq7zr56wi6i5bhrkia4s2ywpv2c98ibnczz709w2v"))))
  3139. (build-system python-build-system)
  3140. (arguments
  3141. '(;; Many tests fail because they require networking.
  3142. #:tests? #f))
  3143. (propagated-inputs
  3144. (list python-requests))
  3145. (home-page "https://github.com/sigmavirus24/betamax")
  3146. (synopsis "Record HTTP interactions with python-requests")
  3147. (description "Betamax will record your test suite's HTTP interactions and
  3148. replay them during future tests. It is designed to work with python-requests.")
  3149. (license license:expat)))
  3150. (define-public python2-betamax
  3151. (package-with-python2 python-betamax))
  3152. (define-public python-betamax-matchers
  3153. (package
  3154. (name "python-betamax-matchers")
  3155. (version "0.4.0")
  3156. (source
  3157. (origin
  3158. (method url-fetch)
  3159. (uri (pypi-uri "betamax-matchers" version))
  3160. (sha256
  3161. (base32
  3162. "07qpwjyq2i2aqhz5iwghnj4pqr2ys5n45v1vmpcfx9r5mhwrsq43"))))
  3163. (build-system python-build-system)
  3164. (propagated-inputs
  3165. (list python-betamax python-requests-toolbelt))
  3166. (home-page "https://github.com/sigmavirus24/betamax_matchers")
  3167. (synopsis "VCR imitation for python-requests")
  3168. (description "@code{betamax-matchers} provides a set of Matchers for
  3169. Betamax.")
  3170. (license license:asl2.0)))
  3171. (define-public python-betamax-serializers
  3172. (package
  3173. (name "python-betamax-serializers")
  3174. (version "0.2.1")
  3175. (source
  3176. (origin
  3177. (method url-fetch)
  3178. (uri (pypi-uri "betamax-serializers" version))
  3179. (sha256
  3180. (base32 "0ja9isbjmzzhxdj69s0kdsvw8nkp073w6an6a4liy5vk3fdl2p1l"))))
  3181. (build-system python-build-system)
  3182. (propagated-inputs
  3183. (list python-betamax python-pyyaml))
  3184. (synopsis "Set of third-party serializers for Betamax")
  3185. (description "Betamax-Serializers are an experimental set of Serializers for
  3186. Betamax that may possibly end up in the main package.")
  3187. (home-page "https://gitlab.com/betamax/serializers")
  3188. (license license:asl2.0)))
  3189. (define-public python-s3transfer
  3190. (package
  3191. (name "python-s3transfer")
  3192. (version "0.5.0")
  3193. (source (origin
  3194. (method url-fetch)
  3195. (uri (pypi-uri "s3transfer" version))
  3196. (sha256
  3197. (base32
  3198. "0k6sc956yrrv9b4laa0r79jhxajpyxr21jcd1ka8m1n53lz85vah"))))
  3199. (build-system python-build-system)
  3200. (arguments
  3201. `(#:phases
  3202. (modify-phases %standard-phases
  3203. (replace 'check
  3204. (lambda* (#:key tests? #:allow-other-keys)
  3205. (when tests?
  3206. ;; Some of the 'integration' tests require network access or
  3207. ;; login credentials.
  3208. (invoke "nosetests" "--exclude=integration")))))))
  3209. (native-inputs
  3210. (list python-docutils python-mock python-nose))
  3211. (propagated-inputs
  3212. (list python-botocore python-urllib3))
  3213. (synopsis "Amazon S3 Transfer Manager")
  3214. (description "S3transfer is a Python library for managing Amazon S3
  3215. transfers.")
  3216. (home-page "https://github.com/boto/s3transfer")
  3217. (license license:asl2.0)))
  3218. (define-public python-slimit
  3219. (package
  3220. (name "python-slimit")
  3221. (version "0.8.1")
  3222. (source
  3223. (origin
  3224. (method url-fetch)
  3225. (uri (pypi-uri "slimit" version ".zip"))
  3226. (sha256
  3227. (base32
  3228. "02vj2x728rs1127q2nc27frrqra4fczivnb7gch6n5lzi7pxqczl"))))
  3229. (build-system python-build-system)
  3230. (native-inputs
  3231. (list unzip))
  3232. (propagated-inputs
  3233. (list python-ply))
  3234. (home-page "https://slimit.readthedocs.io/")
  3235. (synopsis "JavaScript minifier, parser and lexer written in Python")
  3236. (description
  3237. "SlimIt is a JavaScript minifier written in Python. It compiles
  3238. JavaScript into more compact code so that it downloads and runs faster.
  3239. SlimIt also provides a library that includes a JavaScript parser, lexer,
  3240. pretty printer and a tree visitor.")
  3241. (license license:expat)))
  3242. (define-public python-flask-restful
  3243. (package
  3244. (name "python-flask-restful")
  3245. (version "0.3.8")
  3246. (source
  3247. (origin
  3248. (method url-fetch)
  3249. (uri (pypi-uri "Flask-RESTful" version))
  3250. (patches (search-patches "python-flask-restful-werkzeug-compat.patch"))
  3251. (sha256
  3252. (base32
  3253. "05b9lzx5yc3wgml2bcq50lq35h66m8zpj6dc9advcb5z3acsbaay"))))
  3254. (build-system python-build-system)
  3255. (arguments
  3256. `(#:phases
  3257. (modify-phases %standard-phases
  3258. (add-after 'unpack 'fix-imports
  3259. (lambda _
  3260. (substitute* "flask_restful/__init__.py"
  3261. (("flask\\.helpers") "flask.scaffold")))))))
  3262. (propagated-inputs
  3263. (list python-aniso8601 python-flask python-pycrypto python-pytz))
  3264. (native-inputs
  3265. (list ;; Optional dependency of Flask. Tests need it.
  3266. python-blinker python-mock ; For tests
  3267. python-nose)) ;for tests
  3268. (home-page
  3269. "https://www.github.com/flask-restful/flask-restful/")
  3270. (synopsis
  3271. "Flask module for creating REST APIs")
  3272. (description
  3273. "This package contains a Flask module for creating REST APIs.")
  3274. (license license:bsd-3)))
  3275. (define-public python-flask-basicauth
  3276. (package
  3277. (name "python-flask-basicauth")
  3278. (version "0.2.0")
  3279. (source
  3280. (origin
  3281. (method url-fetch)
  3282. (uri (pypi-uri "Flask-BasicAuth" version))
  3283. (sha256
  3284. (base32
  3285. "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
  3286. (build-system python-build-system)
  3287. (arguments
  3288. `(#:phases (modify-phases %standard-phases
  3289. (add-after 'unpack 'fix-imports
  3290. (lambda _
  3291. (substitute* '("docs/index.rst"
  3292. "docs/conf.py"
  3293. "flask_basicauth.py"
  3294. "test_basicauth.py")
  3295. (("flask\\.ext\\.basicauth")
  3296. "flask_basicauth"))
  3297. #t)))))
  3298. (propagated-inputs
  3299. (list python-flask))
  3300. (home-page "https://github.com/jpvanhal/flask-basicauth")
  3301. (synopsis "HTTP basic access authentication for Flask")
  3302. (description
  3303. "This package provides HTTP basic access authentication for Flask.")
  3304. (license license:bsd-3)))
  3305. (define-public python-flask-htpasswd
  3306. (package
  3307. (name "python-flask-htpasswd")
  3308. (version "0.3.1")
  3309. (source
  3310. (origin
  3311. (method url-fetch)
  3312. (uri (pypi-uri "flask-htpasswd" version))
  3313. (sha256
  3314. (base32
  3315. "14q1y1y9i9bhabdnwd25jqzc4ljli23smxfyyh8abxz1vq93pxra"))))
  3316. (build-system python-build-system)
  3317. (propagated-inputs
  3318. (list python-flask python-itsdangerous python-passlib python-tox))
  3319. (home-page "https://github.com/carsongee/flask-htpasswd")
  3320. (synopsis "Basic authentication via htpasswd files in Flask applications")
  3321. (description "This package provides Basic authentication via
  3322. @file{htpasswd} files and access_token authentication in Flask
  3323. applications.")
  3324. (license license:bsd-3)))
  3325. (define-public python-flask-sqlalchemy
  3326. (package
  3327. (name "python-flask-sqlalchemy")
  3328. (version "2.5.1")
  3329. (source (origin
  3330. (method url-fetch)
  3331. (uri (pypi-uri "Flask-SQLAlchemy" version))
  3332. (sha256
  3333. (base32
  3334. "04jrx4sjrz1b20j38qk4qin975xwz30krzq59rfv3b3w7ss49nib"))))
  3335. (build-system python-build-system)
  3336. (propagated-inputs
  3337. (list python-flask python-sqlalchemy))
  3338. (home-page "https://github.com/mitsuhiko/flask-sqlalchemy")
  3339. (synopsis "Module adding SQLAlchemy support to your Flask application")
  3340. (description
  3341. "This package adds SQLAlchemy support to your Flask application.")
  3342. (license license:bsd-3)))
  3343. (define-public python-flask-restful-swagger
  3344. (package
  3345. (name "python-flask-restful-swagger")
  3346. (version "0.20.1")
  3347. (source
  3348. (origin
  3349. (method url-fetch)
  3350. (uri (pypi-uri "flask-restful-swagger" version))
  3351. (sha256
  3352. (base32
  3353. "1p66f98b5zpypnnz56pxpbirchqj6aniw6qyrp8h572l0dn9xlvq"))))
  3354. (build-system python-build-system)
  3355. (arguments '(#:tests? #f)) ;no tests
  3356. (propagated-inputs
  3357. (list python-flask-restful))
  3358. (home-page "https://github.com/rantav/flask-restful-swagger")
  3359. (synopsis "Extract Swagger specs from Flask-Restful projects")
  3360. (description "This package lets you extract Swagger API documentation
  3361. specs from your Flask-Restful projects.")
  3362. (license license:expat)))
  3363. (define-public python-htmlmin
  3364. (package
  3365. (name "python-htmlmin")
  3366. (version "0.1.12")
  3367. (source
  3368. (origin
  3369. (method url-fetch)
  3370. (uri (pypi-uri "htmlmin" version))
  3371. (sha256
  3372. (base32
  3373. "0y51xhabw6x8jk8k93xl8vznshpz3jb6l28075r5sjip613fzhah"))))
  3374. (arguments
  3375. `(#:tests? #f)) ; no tests
  3376. (build-system python-build-system)
  3377. (home-page "https://htmlmin.readthedocs.org/en/latest/")
  3378. (synopsis "HTML minifier")
  3379. (description "@code{htmlmin} is an HTML minifier that just works.
  3380. It comes with safe defaults and easily configurable options.")
  3381. (license license:bsd-3)))
  3382. (define-public python-flask-htmlmin
  3383. (package
  3384. (name "python-flask-htmlmin")
  3385. (version "1.2")
  3386. (source
  3387. (origin
  3388. (method url-fetch)
  3389. (uri (pypi-uri "Flask-HTMLmin" version))
  3390. (sha256
  3391. (base32
  3392. "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
  3393. (propagated-inputs
  3394. (list python-flask python-htmlmin))
  3395. (build-system python-build-system)
  3396. (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
  3397. (synopsis "HTML response minifier for Flask")
  3398. (description
  3399. "Minify @code{text/html} MIME type responses when using @code{Flask}.")
  3400. (license license:bsd-3)))
  3401. (define-public python-jsmin
  3402. (package
  3403. (name "python-jsmin")
  3404. (version "3.0.1")
  3405. (source
  3406. (origin
  3407. (method url-fetch)
  3408. (uri (pypi-uri "jsmin" version))
  3409. (sha256
  3410. (base32
  3411. "1z1brjsvni0260bypldkl8a05sgp0qk18x560zl44igr3q99m5f0"))))
  3412. (build-system python-build-system)
  3413. (home-page "https://github.com/tikitu/jsmin/")
  3414. (synopsis "Python JavaScript minifier")
  3415. (description
  3416. "@code{jsmin} is a JavaScript minifier, usable from both Python code and
  3417. on the command line.")
  3418. (license license:expat)))
  3419. (define-public python-flask-login
  3420. (package
  3421. (name "python-flask-login")
  3422. (version "0.5.0")
  3423. (source
  3424. (origin
  3425. (method git-fetch)
  3426. (uri (git-reference
  3427. (url "https://github.com/maxcountryman/flask-login")
  3428. (commit version)))
  3429. (file-name (git-file-name name version))
  3430. (sha256
  3431. (base32 "11ac924w0y4m0kf3mxnxdlidy88jfa7njw5yyrq16dvnx4iwd8gg"))))
  3432. (build-system python-build-system)
  3433. (propagated-inputs
  3434. (list python-flask))
  3435. (native-inputs
  3436. ;; For tests.
  3437. (list python-blinker
  3438. python-coverage
  3439. python-mock
  3440. python-pycodestyle
  3441. python-pyflakes
  3442. python-pytest
  3443. python-semantic-version
  3444. python-werkzeug))
  3445. (home-page "https://github.com/maxcountryman/flask-login")
  3446. (synopsis "User session management for Flask")
  3447. (description
  3448. "@code{Flask-Login} provides user session management for Flask. It
  3449. handles the common tasks of logging in, logging out, and remembering your
  3450. users' sessions over extended periods of time.")
  3451. (license license:expat)))
  3452. (define-public python-oauth2client
  3453. (package
  3454. (name "python-oauth2client")
  3455. (version "4.0.0")
  3456. (source
  3457. (origin
  3458. (method url-fetch)
  3459. (uri (pypi-uri "oauth2client" version))
  3460. (sha256
  3461. (base32
  3462. "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
  3463. (build-system python-build-system)
  3464. (arguments
  3465. `(#:tests? #f))
  3466. (propagated-inputs
  3467. (list python-httplib2 python-pyasn1 python-pyasn1-modules python-rsa
  3468. python-six))
  3469. (home-page "https://github.com/google/oauth2client/")
  3470. (synopsis "OAuth 2.0 client library")
  3471. (description "@code{python-oauth2client} provides an OAuth 2.0 client
  3472. library for Python")
  3473. (license license:asl2.0)))
  3474. (define-public python2-oauth2client
  3475. (package-with-python2 python-oauth2client))
  3476. (define-public python-flask-oidc
  3477. (package
  3478. (name "python-flask-oidc")
  3479. (version "1.4.0")
  3480. (source
  3481. (origin
  3482. (method url-fetch)
  3483. (uri (pypi-uri "flask-oidc" version))
  3484. (sha256
  3485. (base32
  3486. "0klgwpn2iy5y7011xh2c8zkryxdwkpxh7qjs3hp5cynl748ia4hc"))))
  3487. (build-system python-build-system)
  3488. (arguments
  3489. (list #:phases
  3490. #~(modify-phases %standard-phases
  3491. (replace 'check
  3492. (lambda* (#:key tests? #:allow-other-keys)
  3493. (when tests?
  3494. (invoke "nosetests")))))))
  3495. (propagated-inputs
  3496. (list python-flask python-itsdangerous python-oauth2client
  3497. python-six))
  3498. (native-inputs
  3499. (list python-nose python-mock))
  3500. (home-page "https://github.com/puiterwijk/flask-oidc")
  3501. (synopsis "OpenID Connect extension for Flask")
  3502. (description "@code{python-flask-oidc} provides an OpenID Connect extension
  3503. for Flask.")
  3504. (license license:bsd-2)))
  3505. (define-public python-webassets
  3506. (package
  3507. (name "python-webassets")
  3508. (version "2.0")
  3509. (source
  3510. (origin
  3511. (method url-fetch)
  3512. (uri (pypi-uri "webassets" version))
  3513. (sha256
  3514. (base32
  3515. "1kc1042jydgk54xpgcp0r1ib4gys91nhy285jzfcxj3pfqrk4w8n"))))
  3516. (build-system python-build-system)
  3517. (arguments
  3518. '(#:phases (modify-phases %standard-phases
  3519. (add-before 'check 'adjust-tests
  3520. (lambda _
  3521. ;; Fix for Python 3.9 compatibility.
  3522. (substitute* "tests/test_script.py"
  3523. (("self\\.t\\.isAlive")
  3524. "self.t.is_alive"))
  3525. ;; This test requires 'postcss' and 'babel' which are
  3526. ;; not yet available in Guix.
  3527. (delete-file "tests/test_filters.py")))
  3528. (replace 'check
  3529. (lambda _
  3530. (invoke "pytest" "-vv"))))))
  3531. (native-inputs
  3532. (list python-jinja2 python-mock python-nose python-pytest))
  3533. (home-page "https://github.com/miracle2k/webassets")
  3534. (synopsis "Media asset management")
  3535. (description "Merges, minifies and compresses Javascript and CSS files,
  3536. supporting a variety of different filters, including YUI, jsmin, jspacker or
  3537. CSS tidy. Also supports URL rewriting in CSS files.")
  3538. (license license:bsd-2)))
  3539. (define-public python-cssmin
  3540. (package
  3541. (name "python-cssmin")
  3542. (version "0.2.0")
  3543. (source
  3544. (origin
  3545. (method url-fetch)
  3546. (uri (pypi-uri "cssmin" version))
  3547. (sha256
  3548. (base32
  3549. "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
  3550. (build-system python-build-system)
  3551. (home-page "https://github.com/zacharyvoase/cssmin")
  3552. (synopsis "Python port of the YUI CSS Compressor")
  3553. (description "Python port of the YUI CSS Compressor.")
  3554. (license (list license:expat license:bsd-3))))
  3555. (define-public python-elasticsearch
  3556. (package
  3557. (name "python-elasticsearch")
  3558. (version "7.13.4")
  3559. (source
  3560. (origin
  3561. (method url-fetch)
  3562. (uri (pypi-uri "elasticsearch" version))
  3563. (sha256
  3564. (base32
  3565. "1q38w9nh2j2yi82d8rhzb57597l4lq5zx7xzfg45xf7ffrgsipaj"))))
  3566. (build-system python-build-system)
  3567. (propagated-inputs
  3568. (list python-certifi python-urllib3))
  3569. (arguments
  3570. ;; tests require the test_elasticsearch module but it is not distributed.
  3571. `(#:tests? #f))
  3572. (home-page "https://github.com/elastic/elasticsearch-py")
  3573. (synopsis "Low-level client for Elasticsearch")
  3574. (description "Official low-level client for Elasticsearch. Its goal is to
  3575. provide common ground for all Elasticsearch-related code in Python; because of
  3576. this it tries to be opinion-free and very extendable.")
  3577. (license license:expat)))
  3578. (define-public python-engineio
  3579. (package
  3580. (name "python-engineio")
  3581. (version "4.0.1")
  3582. (source
  3583. (origin
  3584. (method url-fetch)
  3585. (uri (pypi-uri "python-engineio" version))
  3586. (sha256
  3587. (base32
  3588. "0xqkjjxbxakz9fd7v94rkr2r5r9nrkap2c3gf3abbd0j6ld5qmxv"))))
  3589. (build-system python-build-system)
  3590. (propagated-inputs
  3591. (list python-aiohttp python-requests python-websocket-client))
  3592. (arguments '(#:tests? #f)) ; Tests not included in release tarball.
  3593. (home-page "https://github.com/miguelgrinberg/python-engineio/")
  3594. (synopsis "Engine.IO server")
  3595. (description "Python implementation of the Engine.IO realtime client and
  3596. server.")
  3597. (license license:expat)))
  3598. (define-public python-flask-migrate
  3599. (package
  3600. (name "python-flask-migrate")
  3601. (version "3.1.0")
  3602. (home-page "https://github.com/miguelgrinberg/flask-migrate/")
  3603. (source (origin
  3604. (method git-fetch)
  3605. (uri (git-reference (url home-page)
  3606. (commit (string-append "v" version))))
  3607. (sha256
  3608. (base32
  3609. "0zj7qpknvlhrh4fsp5sx4fwyx3sp41ynclka992zympm3xym9zyq"))))
  3610. (build-system python-build-system)
  3611. (propagated-inputs
  3612. (list python-flask python-alembic python-flask-sqlalchemy))
  3613. (synopsis "SQLAlchemy database migrations for Flask programs using
  3614. Alembic")
  3615. (description "This package contains SQLAlchemy database migration tools
  3616. for Flask programs that are using @code{python-alembic}.")
  3617. (license license:expat)))
  3618. (define-public python-genshi
  3619. (package
  3620. (name "python-genshi")
  3621. (version "0.7.5")
  3622. (source
  3623. (origin
  3624. (method git-fetch)
  3625. (uri (git-reference
  3626. (url "https://github.com/edgewall/genshi")
  3627. (commit version)))
  3628. (file-name (git-file-name name version))
  3629. (sha256
  3630. (base32 "04i0caywiwrgw09grz988n15qr9lr31d9n6a529p8v80cy1fv23c"))))
  3631. (propagated-inputs
  3632. (list python-six))
  3633. (build-system python-build-system)
  3634. (home-page "https://genshi.edgewall.org/")
  3635. (synopsis "Toolkit for generation of output for the web")
  3636. (description "Genshi is a Python library that provides an integrated set
  3637. of components for parsing, generating, and processing HTML, XML or other
  3638. textual content for output generation on the web.")
  3639. (license license:bsd-3)))
  3640. (define-public python2-genshi
  3641. (package-with-python2 python-genshi))
  3642. (define-public python-flask-principal
  3643. (package
  3644. (name "python-flask-principal")
  3645. (version "0.4.0")
  3646. (source
  3647. (origin
  3648. (method url-fetch)
  3649. (uri (pypi-uri "Flask-Principal" version))
  3650. (sha256
  3651. (base32
  3652. "0lwlr5smz8vfm5h9a9i7da3q1c24xqc6vm9jdywdpgxfbi5i7mpm"))))
  3653. (build-system python-build-system)
  3654. (propagated-inputs
  3655. (list python-blinker))
  3656. (native-inputs
  3657. (list python-flask python-nose))
  3658. (home-page "https://pythonhosted.org/Flask-Principal/")
  3659. (synopsis "Identity management for Flask")
  3660. (description "@code{flask_principal} is a identity management library for
  3661. Flask. It supports managing both authentication and authorization data in a
  3662. thread-local variable.")
  3663. (license license:expat)))
  3664. (define-public python-flask-httpauth
  3665. (package
  3666. (name "python-flask-httpauth")
  3667. (version "3.2.3")
  3668. (source
  3669. (origin
  3670. (method url-fetch)
  3671. (uri (pypi-uri "Flask-HTTPAuth" version))
  3672. (sha256
  3673. (base32
  3674. "13gff5w1mqpzm5nccyg02v3ifb9ifqh5k866cssjhghhg6msfjsz"))))
  3675. (build-system python-build-system)
  3676. (native-inputs
  3677. (list python-flask))
  3678. (home-page "https://github.com/miguelgrinberg/flask-httpauth/")
  3679. (synopsis "Basic and Digest HTTP authentication for Flask routes")
  3680. (description "@code{flask_httpauth} provides Basic and Digest HTTP
  3681. authentication for Flask routes.")
  3682. (license license:expat)))
  3683. (define-public python-uritemplate
  3684. (package
  3685. (name "python-uritemplate")
  3686. (version "4.1.1")
  3687. (source
  3688. (origin
  3689. (method url-fetch)
  3690. (uri (pypi-uri "uritemplate" version))
  3691. (sha256
  3692. (base32
  3693. "1w14a775d92mx9pdhb5zimifpfr2lfcn0vfdpjagcy9vbkyfsij3"))))
  3694. (build-system python-build-system)
  3695. (home-page "https://uritemplate.readthedocs.org")
  3696. (synopsis "Library to deal with URI Templates")
  3697. (description "@code{uritemplate} provides Python library to deal with URI
  3698. Templates.")
  3699. ;; The software is made available under the terms of *either* of the
  3700. ;; licenses found in LICENSE.APACHE or LICENSE.BSD. Contributions
  3701. ;; are made under *both* licenses (excerpt from the LICENSE file).
  3702. (license (list license:bsd-2 license:asl2.0))))
  3703. (define-public python-publicsuffix
  3704. (package
  3705. (name "python-publicsuffix")
  3706. (version "1.1.0")
  3707. (source (origin
  3708. (method url-fetch)
  3709. (uri (pypi-uri "publicsuffix" version))
  3710. (sha256
  3711. (base32
  3712. "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
  3713. (build-system python-build-system)
  3714. (arguments
  3715. `(#:tests? #f)) ; tests use the internet
  3716. (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
  3717. (synopsis "Get suffix for a domain name")
  3718. (description "Get a public suffix for a domain name using the Public Suffix
  3719. List.")
  3720. (license license:expat)))
  3721. (define-public python-publicsuffix2
  3722. (package
  3723. (name "python-publicsuffix2")
  3724. (version "2.20191221")
  3725. (source
  3726. (origin
  3727. (method url-fetch)
  3728. (uri (pypi-uri "publicsuffix2" version))
  3729. (sha256
  3730. (base32 "0yzysvfj1najr1mb4pcqrbmjir3xpb69rlffln95a3cdm8qwry00"))))
  3731. (build-system python-build-system)
  3732. (arguments
  3733. '(#:phases
  3734. (modify-phases %standard-phases
  3735. (add-after 'unpack 'ignore-maintainer-inputs
  3736. (lambda _
  3737. ;; Comment out a demand for python-requests, which is used only by
  3738. ;; the unused ‘update_psl’ helper command.
  3739. (substitute* "setup.py"
  3740. (("'requests " match)
  3741. (format #f "# ~a" match)))
  3742. #t)))
  3743. #:tests? #f)) ; the test suite requires network access
  3744. (home-page "https://github.com/pombredanne/python-publicsuffix2")
  3745. (synopsis "Get a public suffix for a domain name using the Public Suffix List")
  3746. (description "Get a public suffix for a domain name using the Public Suffix
  3747. List. Forked from and using the same API as the publicsuffix package.")
  3748. (license (list license:expat license:mpl2.0))))
  3749. (define-public python-werkzeug
  3750. (package
  3751. (name "python-werkzeug")
  3752. (version "2.0.2")
  3753. (source
  3754. (origin
  3755. (method url-fetch)
  3756. (uri (pypi-uri "Werkzeug" version))
  3757. (sha256
  3758. (base32
  3759. "16nvv9dh37ssf5pkny9yj2li0n6wyzsygh8a9i86r3gfipybcaxa"))))
  3760. (build-system python-build-system)
  3761. (arguments
  3762. '(#:phases
  3763. (modify-phases %standard-phases
  3764. (replace 'check
  3765. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  3766. (when tests?
  3767. (add-installed-pythonpath inputs outputs)
  3768. (invoke "python" "-m" "pytest"
  3769. ;; Test tries to use the network.
  3770. "-k not test_reloader_sys_path")))))))
  3771. (propagated-inputs
  3772. (list python-requests))
  3773. (native-inputs
  3774. (list python-pytest python-pytest-timeout python-pytest-xprocess))
  3775. (home-page "https://palletsprojects.com/p/werkzeug/")
  3776. (synopsis "Utilities for WSGI applications")
  3777. (description "One of the most advanced WSGI utility modules. It includes a
  3778. powerful debugger, full-featured request and response objects, HTTP utilities to
  3779. handle entity tags, cache control headers, HTTP dates, cookie handling, file
  3780. uploads, a powerful URL routing system and a bunch of community-contributed
  3781. addon modules.")
  3782. (license license:x11)))
  3783. (define-public python-werkzeug-1.0
  3784. (package
  3785. (inherit python-werkzeug)
  3786. (version "1.0.1")
  3787. (source (origin
  3788. (method url-fetch)
  3789. (uri (pypi-uri "Werkzeug" version))
  3790. (sha256
  3791. (base32
  3792. "0z74sa1xw5h20yin9faj0vvdbq713cgbj84klc72jr9nmpjv303c"))
  3793. (patches (search-patches "python-werkzeug-tests.patch"))))
  3794. (arguments
  3795. '(#:phases
  3796. (modify-phases %standard-phases
  3797. (delete 'check)
  3798. (add-after 'install 'check
  3799. (lambda* (#:key inputs outputs #:allow-other-keys)
  3800. (add-installed-pythonpath inputs outputs)
  3801. (invoke "python" "-m" "pytest"))))))
  3802. (propagated-inputs
  3803. (list python-requests))
  3804. (native-inputs
  3805. (list python-pytest python-pytest-timeout))))
  3806. (define-public python-bottle
  3807. (package
  3808. (name "python-bottle")
  3809. (version "0.12.19")
  3810. (source
  3811. (origin
  3812. (method url-fetch)
  3813. (uri (pypi-uri "bottle" version))
  3814. (sha256
  3815. (base32 "0b6s50vc4iad97b6bb3xnyrgajb3nj6n6jbr5p54a4vapky3zmx9"))))
  3816. (build-system python-build-system)
  3817. (home-page "https://bottlepy.org/")
  3818. (synopsis "WSGI framework for small web-applications")
  3819. (description "@code{python-bottle} is a WSGI framework for small web-applications.")
  3820. (license license:expat)))
  3821. (define-public python2-bottle
  3822. (package-with-python2 python-bottle))
  3823. (define-public python-wtforms
  3824. (package
  3825. (name "python-wtforms")
  3826. (version "2.3.3")
  3827. (source
  3828. (origin
  3829. (method url-fetch)
  3830. (uri (pypi-uri "WTForms" version))
  3831. (sha256
  3832. (base32
  3833. "17427m7p9nn9byzva697dkykykwcp2br3bxvi8vciywlmkh5s6c1"))))
  3834. (build-system python-build-system)
  3835. (arguments
  3836. `(#:phases
  3837. (modify-phases %standard-phases
  3838. (add-after 'unpack 'delete-bundled-test
  3839. (lambda _
  3840. ;; Delete test copied from a third party package that fails
  3841. ;; with newer SQLAlchemy. This can be removed for 3.0.
  3842. ;; See <https://github.com/wtforms/wtforms/issues/696>.
  3843. (delete-file "tests/ext_sqlalchemy.py")))
  3844. (replace 'check
  3845. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  3846. (when tests?
  3847. (add-installed-pythonpath inputs outputs)
  3848. (invoke "python" "setup.py" "compile_catalog")
  3849. (invoke "python" "tests/runtests.py")))))))
  3850. (native-inputs
  3851. (list python-dateutil python-sqlalchemy))
  3852. (propagated-inputs
  3853. (list python-babel python-email-validator python-markupsafe))
  3854. (home-page "http://wtforms.simplecodes.com/")
  3855. (synopsis
  3856. "Form validation and rendering library for Python web development")
  3857. (description
  3858. "WTForms is a flexible forms validation and rendering library
  3859. for Python web development. It is very similar to the web form API
  3860. available in Django, but is a standalone package.")
  3861. (license license:bsd-3)))
  3862. (define-public python-paste
  3863. (package
  3864. (name "python-paste")
  3865. (version "3.0.6")
  3866. (source
  3867. (origin
  3868. (method url-fetch)
  3869. (uri (pypi-uri "Paste" version))
  3870. (sha256
  3871. (base32
  3872. "14lbi9asn5agsdf7r97prkjpz7amgmp529lbvfhf0nv881xczah6"))
  3873. (patches (search-patches "python-paste-remove-timing-test.patch"))
  3874. (modules '((guix build utils)))
  3875. (snippet
  3876. '(begin
  3877. ;; This test calls out to the internet.
  3878. (delete-file "tests/test_proxy.py") #t))))
  3879. (build-system python-build-system)
  3880. (native-inputs
  3881. (list python-pytest python-pytest-runner python-nose))
  3882. (propagated-inputs
  3883. (list python-six))
  3884. (home-page "https://pythonpaste.readthedocs.io/")
  3885. (synopsis
  3886. "Python web development tools, focusing on WSGI")
  3887. (description
  3888. "Paste provides a variety of web development tools and middleware which
  3889. can be nested together to build web applications. Paste's design closely
  3890. follows ideas flowing from WSGI (Web Standard Gateway Interface).")
  3891. (license license:expat)))
  3892. (define-public python-pastescript
  3893. (package
  3894. (name "python-pastescript")
  3895. (version "2.0.2")
  3896. (source
  3897. (origin
  3898. (method url-fetch)
  3899. (uri (pypi-uri "PasteScript" version))
  3900. (sha256
  3901. (base32
  3902. "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
  3903. (build-system python-build-system)
  3904. (native-inputs
  3905. (list python-nose))
  3906. (propagated-inputs
  3907. (list python-paste python-pastedeploy))
  3908. (home-page (string-append "https://web.archive.org/web/20161025192515/"
  3909. "http://pythonpaste.org/script/"))
  3910. (arguments
  3911. '(;; Unfortunately, this requires the latest unittest2,
  3912. ;; but that requires traceback2 which requires linecache2 which requires
  3913. ;; unittest2. So we're skipping tests for now.
  3914. ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
  3915. ;; so in theory we could get around this situation somehow.)
  3916. #:tests? #f))
  3917. (synopsis
  3918. "Pluggable command line tool for serving web applications and more")
  3919. (description
  3920. "PasteScript is a plugin-friendly command line tool which provides a
  3921. variety of features, from launching web applications to bootstrapping project
  3922. layouts.")
  3923. (license license:expat)))
  3924. (define-public python-urlgrabber
  3925. (package
  3926. (name "python-urlgrabber")
  3927. (version "4.1.0")
  3928. (source
  3929. (origin
  3930. (method url-fetch)
  3931. (uri (pypi-uri "urlgrabber" version))
  3932. (sha256
  3933. (base32 "0fg16zlw49cw7pjq9dhpc5vd35d5zz1mlki55m464qxfmfpzhnh7"))))
  3934. (build-system python-build-system)
  3935. (arguments
  3936. `(#:phases
  3937. (modify-phases %standard-phases
  3938. (replace 'check
  3939. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  3940. (when tests?
  3941. (add-installed-pythonpath inputs outputs)
  3942. (invoke "python" "test/runtests.py")))))))
  3943. (propagated-inputs
  3944. (list python-pycurl python-setuptools python-six))
  3945. (home-page "http://urlgrabber.baseurl.org/") ; no HTTPS
  3946. (synopsis "High-level cross protocol url-grabber")
  3947. (description
  3948. "@code{urlgrabber} is a library that unifies access to files available on
  3949. the web, FTP or locally. It supports HTTP, FTP and file:// protocols, it
  3950. supports features like HTTP keep-alive, reget, throttling and more.")
  3951. (license license:lgpl2.1+)))
  3952. (define-public python-pycares
  3953. (package
  3954. (name "python-pycares")
  3955. (version "2.3.0")
  3956. (source
  3957. (origin
  3958. (method url-fetch)
  3959. (uri (pypi-uri "pycares" version))
  3960. (sha256
  3961. (base32
  3962. "0h4fxw5drrhfyslzmfpljk0qnnpbhhb20hnnndzahhbwylyw1x1n"))))
  3963. (build-system python-build-system)
  3964. (arguments
  3965. `(#:tests? #f)) ;tests require internet access
  3966. (home-page "https://github.com/saghul/pycares")
  3967. (synopsis "Python interface for @code{c-ares}")
  3968. (description "@code{pycares} is a Python module which provides an
  3969. interface to @code{c-ares}, a C library that performs DNS requests and
  3970. name resolutions asynchronously.")
  3971. (license license:expat)))
  3972. (define-public python-yarl
  3973. (package
  3974. (name "python-yarl")
  3975. (version "1.6.3")
  3976. (source
  3977. (origin
  3978. (method url-fetch)
  3979. (uri (pypi-uri "yarl" version))
  3980. (sha256
  3981. (base32
  3982. "045z4ssg8g5h0qhz8hnx74hswgkndaldqq1xi5l1n5s0j996d44a"))
  3983. (modules '((guix build utils)))
  3984. (snippet
  3985. #~(begin
  3986. (delete-file "yarl/_quoting_c.c")))))
  3987. (build-system python-build-system)
  3988. (arguments
  3989. (list #:tests? #f ; test suite can't find yarl._quoting_c
  3990. #:phases
  3991. #~(modify-phases %standard-phases
  3992. (add-after 'unpack 'cythonize-code
  3993. (lambda _
  3994. (invoke "cython" "yarl/_quoting_c.pyx")))
  3995. (replace 'check
  3996. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  3997. (when tests?
  3998. (substitute* "setup.cfg"
  3999. (("--cov=yarl") ""))
  4000. (add-installed-pythonpath inputs outputs)
  4001. (invoke "python" "-m" "pytest")))))))
  4002. (native-inputs
  4003. (list python-cython python-pytest python-pytest-runner))
  4004. (propagated-inputs
  4005. (list python-idna python-multidict))
  4006. (home-page "https://github.com/aio-libs/yarl/")
  4007. (synopsis "Yet another URL library")
  4008. (description "@code{yarl} module provides handy @code{URL} class
  4009. for URL parsing and changing.")
  4010. (license license:asl2.0)))
  4011. (define-public python-canvasapi
  4012. (package
  4013. (name "python-canvasapi")
  4014. (version "2.2.0")
  4015. (source (origin
  4016. (method git-fetch)
  4017. (uri (git-reference
  4018. (url "https://github.com/ucfopen/canvasapi")
  4019. (commit (string-append "v" version))))
  4020. (file-name (git-file-name name version))
  4021. (sha256
  4022. (base32
  4023. "0i13wrq2czcaz3h98pvnsl237104v611y9636jf32b1nn76sbp0p"))))
  4024. (build-system python-build-system)
  4025. (propagated-inputs (list python-pytz python-requests))
  4026. (native-inputs (list python-requests-mock))
  4027. (home-page "https://github.com/ucfopen/canvasapi")
  4028. (synopsis "API wrapper for the Canvas LMS")
  4029. (description
  4030. "CanvasAPI is a Python library for accessing Instructure’s Canvas LMS API.
  4031. The library enables developers to programmatically manage Canvas courses,
  4032. users, gradebooks, and more.")
  4033. (license license:expat)))
  4034. (define-public python-google
  4035. (package
  4036. (name "python-google")
  4037. (version "3.0.0")
  4038. (source (origin
  4039. (method url-fetch)
  4040. (uri (pypi-uri "google" version))
  4041. (sha256
  4042. (base32
  4043. "1gncv3l11za0mpxvmpaf5n5j3jzp282rz62yml4ha4z55q930d8l"))))
  4044. (build-system python-build-system)
  4045. (arguments
  4046. `(#:tests? #f)) ; There are no tests.
  4047. (home-page "https://breakingcode.wordpress.com/")
  4048. (synopsis "Python bindings to the Google search engine")
  4049. (description "This package provides Python bindings for using the
  4050. Google search engine. Its module is called @code{googlesearch}.")
  4051. (license license:bsd-3)))
  4052. (define-public python-google-api-client
  4053. (package
  4054. (name "python-google-api-client")
  4055. (version "1.6.7")
  4056. (source
  4057. (origin
  4058. (method url-fetch)
  4059. (uri (pypi-uri "google-api-python-client" version))
  4060. (sha256
  4061. (base32
  4062. "1wpbbbxfpy9mwxdy3kn352cb590ladv574j1aa2l4grjdqw3ln05"))))
  4063. (build-system python-build-system)
  4064. (arguments
  4065. `(#:tests? #f ; tests require internet access
  4066. #:phases
  4067. (modify-phases %standard-phases
  4068. (add-after 'unpack 'fix-setup-py
  4069. (lambda _
  4070. (substitute* "setup.py"
  4071. (("googleapiclient/discovery_cache")
  4072. "googleapiclient.discovery_cache"))
  4073. #t)))))
  4074. (native-inputs
  4075. (list python-httplib2 python-six python-oauth2client
  4076. python-uritemplate))
  4077. (home-page "https://github.com/google/google-api-python-client")
  4078. (synopsis "Core Python library for accessing Google APIs")
  4079. (description "Python client library for Google's discovery based APIs")
  4080. (license license:asl2.0)))
  4081. (define-public python-hawkauthlib
  4082. (package
  4083. (name "python-hawkauthlib")
  4084. (version "2.0.0")
  4085. (source
  4086. (origin
  4087. (method url-fetch)
  4088. (uri (pypi-uri "hawkauthlib" version))
  4089. (sha256
  4090. (base32
  4091. "03ai47s4h8nfnrf25shbfvkm1b9n1ccd4nmmj280sg1fayi69zgg"))))
  4092. (build-system python-build-system)
  4093. (propagated-inputs
  4094. (list python-requests python-webob))
  4095. (home-page "https://github.com/mozilla-services/hawkauthlib")
  4096. (synopsis "Hawk Access Authentication protocol")
  4097. (description
  4098. "This is a low-level Python library for implementing Hawk Access Authentication,
  4099. a simple HTTP request-signing scheme.")
  4100. (license license:mpl2.0)))
  4101. (define-public python-pybrowserid
  4102. (package
  4103. (name "python-pybrowserid")
  4104. (version "0.14.0")
  4105. (source
  4106. (origin
  4107. (method url-fetch)
  4108. (uri (pypi-uri "PyBrowserID" version))
  4109. (sha256
  4110. (base32
  4111. "1qvi79kfb8x9kxkm5lw2mp42hm82cpps1xknmsb5ghkwx1lpc8kc"))))
  4112. (build-system python-build-system)
  4113. (propagated-inputs
  4114. (list python-requests))
  4115. (native-inputs
  4116. (list python-mock))
  4117. (home-page "https://github.com/mozilla/PyBrowserID")
  4118. (synopsis "Python library for the BrowserID protocol")
  4119. (description
  4120. "This is a Python client library for the BrowserID protocol that
  4121. underlies Mozilla Persona.")
  4122. (license license:mpl2.0)))
  4123. (define-public python-pyfxa
  4124. (package
  4125. (name "python-pyfxa")
  4126. (version "0.6.0")
  4127. (source
  4128. (origin
  4129. (method url-fetch)
  4130. (uri (pypi-uri "PyFxA" version))
  4131. (sha256
  4132. (base32
  4133. "0axl16fyrz2r88gnw4b12mk7dpkqscv8c4wsc1y5hicl7bsbc4fm"))))
  4134. (build-system python-build-system)
  4135. (arguments '(#:tests? #f)) ; 17 tests require network access
  4136. (propagated-inputs
  4137. (list python-cryptography python-hawkauthlib python-pybrowserid
  4138. python-requests python-six))
  4139. (native-inputs
  4140. (list python-grequests python-mock python-responses python-unittest2))
  4141. (home-page "https://github.com/mozilla/PyFxA")
  4142. (synopsis "Firefox Accounts client library for Python")
  4143. (description
  4144. "This is a Python library for interacting with the Firefox Accounts
  4145. ecosystem.")
  4146. (license license:mpl2.0)))
  4147. (define-public python-hyperlink
  4148. (package
  4149. (name "python-hyperlink")
  4150. (version "19.0.0")
  4151. (source
  4152. (origin
  4153. (method url-fetch)
  4154. (uri (pypi-uri "hyperlink" version))
  4155. (sha256
  4156. (base32
  4157. "0m2nhi0j8wmgfscf974wd5v1xfq8mah286hil6npy1ys0m3y7222"))))
  4158. (build-system python-build-system)
  4159. (propagated-inputs
  4160. (list python-idna))
  4161. (home-page "https://github.com/python-hyper/hyperlink")
  4162. (synopsis "Python module to create immutable URLs according to spec")
  4163. (description "This package provides a Python module to create immutable, and
  4164. correct URLs for Python according to RFCs 3986 and 3987.")
  4165. (license license:expat)))
  4166. (define-public python-treq
  4167. (package
  4168. (name "python-treq")
  4169. (version "18.6.0")
  4170. (source
  4171. (origin
  4172. (method url-fetch)
  4173. (uri (pypi-uri "treq" version))
  4174. (sha256
  4175. (base32
  4176. "0j4zwq9p1c9piv1vc66nxcv9s6hdinf90jwkbsm91k14npv9zq4i"))))
  4177. (build-system python-build-system)
  4178. (propagated-inputs
  4179. (list python-attrs
  4180. python-idna
  4181. python-incremental
  4182. python-requests
  4183. python-service-identity
  4184. python-twisted))
  4185. (home-page "https://github.com/twisted/treq")
  4186. (synopsis "Requests-like API built on top of twisted.web's Agent")
  4187. (description "This package provides an HTTP library inspired by
  4188. @code{requests}} but written on top of Twisted's @code{Agents}. It offers a
  4189. high level API for making HTTP requests when using Twisted.")
  4190. (license license:expat)))
  4191. (define-public python-autobahn
  4192. (package
  4193. (name "python-autobahn")
  4194. (version "19.2.1")
  4195. (source
  4196. (origin
  4197. (method url-fetch)
  4198. (uri (pypi-uri "autobahn" version))
  4199. (sha256
  4200. (base32
  4201. "1mm7j24ls01c7jb1ad5p5cpyxvzgydiyf8b04ihykh2v8g98j0x7"))))
  4202. (build-system python-build-system)
  4203. (arguments
  4204. ;; The tests fail to run:
  4205. ;; https://github.com/crossbario/autobahn-python/issues/1117
  4206. `(#:tests? #f))
  4207. (propagated-inputs
  4208. (list python-cffi python-twisted python-txaio))
  4209. (home-page "https://crossbar.io/autobahn/")
  4210. (synopsis "Web Application Messaging Protocol implementation")
  4211. (description "This package provides an implementation of the @dfn{Web Application
  4212. Messaging Protocol} (WAMP). WAMP connects components in distributed
  4213. applications using Publish and Subscribe (PubSub) and routed Remote Procedure
  4214. Calls (rRPC). It is ideal for distributed, multi-client and server applications
  4215. such as IoT applications or multi-user database-driven business applications.")
  4216. (license license:expat)))
  4217. (define-public python-ws4py
  4218. (package
  4219. (name "python-ws4py")
  4220. (version "0.5.1")
  4221. (source
  4222. (origin
  4223. (method url-fetch)
  4224. (uri (pypi-uri "ws4py" version))
  4225. (sha256
  4226. (base32
  4227. "10slbbf2jm4hpr92jx7kh7mhf48sjl01v2w4d8z3f1p0ybbp7l19"))))
  4228. (build-system python-build-system)
  4229. (arguments
  4230. `(#:phases
  4231. (modify-phases %standard-phases
  4232. (add-after 'unpack 'python3.7-compatibility
  4233. (lambda _
  4234. (substitute* '("ws4py/server/tulipserver.py"
  4235. "ws4py/async_websocket.py")
  4236. (("asyncio.async")
  4237. "asyncio.ensure_future"))
  4238. #t))
  4239. ;; We don't have a package for cherrypy.
  4240. (add-after 'unpack 'remove-cherrypy-support
  4241. (lambda _
  4242. (delete-file "ws4py/server/cherrypyserver.py")
  4243. #t)))))
  4244. (propagated-inputs
  4245. (list python-gevent python-tornado))
  4246. (home-page "https://github.com/Lawouach/WebSocket-for-Python")
  4247. (synopsis "WebSocket client and server library")
  4248. (description
  4249. "This package provides a WebSocket client and server library for
  4250. Python.")
  4251. (license license:bsd-3)))
  4252. (define-public python-slugify
  4253. (package
  4254. (name "python-slugify")
  4255. (version "5.0.2")
  4256. (source
  4257. (origin
  4258. (method url-fetch)
  4259. (uri (pypi-uri "python-slugify" version))
  4260. (sha256
  4261. (base32 "1aww2ncglyii4jkbfjxqhinivawf9zmwifcj32d69gpwp6h86czi"))))
  4262. (propagated-inputs
  4263. (list python-unidecode python-text-unidecode))
  4264. (arguments
  4265. `(#:phases
  4266. (modify-phases %standard-phases
  4267. (replace 'check
  4268. (lambda* (#:key tests? #:allow-other-keys)
  4269. (when tests?
  4270. (invoke "python" "test.py")))))))
  4271. (build-system python-build-system)
  4272. (home-page "https://github.com/un33k/python-slugify")
  4273. (synopsis "Python Slugify application that handles Unicode")
  4274. (description "This package provides a @command{slufigy} command and
  4275. library to create slugs from unicode strings while keeping it DRY.")
  4276. (license license:expat)))
  4277. (define-public python-branca
  4278. (package
  4279. (name "python-branca")
  4280. (version "0.3.1")
  4281. (source
  4282. (origin
  4283. (method url-fetch)
  4284. (uri (pypi-uri "branca" version))
  4285. (sha256
  4286. (base32
  4287. "0pmigd521j2228xf8x34vbx0niwvms7xl7za0lymywj0vydjqxiy"))))
  4288. (build-system python-build-system)
  4289. (propagated-inputs
  4290. (list python-jinja2 python-six))
  4291. (native-inputs
  4292. (list python-pytest))
  4293. (home-page "https://github.com/python-visualization/branca")
  4294. (synopsis "Generate complex HTML+JS pages with Python")
  4295. (description "Generate complex HTML+JS pages with Python")
  4296. (license license:expat)))
  4297. (define-public python-tinycss
  4298. (package
  4299. (name "python-tinycss")
  4300. (version "0.4")
  4301. (source
  4302. (origin
  4303. (method url-fetch)
  4304. (uri (pypi-uri "tinycss" version))
  4305. (sha256
  4306. (base32 "0vkifr595h28ymkjhrswwf0bm23lhznh5f44xyp7x7jy1ssnyc0j"))))
  4307. (build-system python-build-system)
  4308. (arguments
  4309. `(#:phases
  4310. (modify-phases %standard-phases
  4311. (add-after 'unpack 'disable-flake8-isort
  4312. ;; Flake8 and isort tests fail.
  4313. (lambda _
  4314. (substitute* "setup.cfg" ((" --flake8 --isort") ""))
  4315. #t))
  4316. (replace 'check
  4317. (lambda _
  4318. ;; Disable failing test.
  4319. (invoke "python" "-m" "pytest" "-k"
  4320. "not test_speedups"))))))
  4321. (native-inputs
  4322. (list python-pytest-cov python-pytest-flake8 python-pytest-isort
  4323. python-pytest-runner))
  4324. (home-page "https://tinycss.readthedocs.io/")
  4325. (synopsis "Complete yet simple CSS parser for Python")
  4326. (description
  4327. "@code{tinycss} is a complete yet simple CSS parser for Python. It
  4328. supports the full syntax and error handling for CSS 2.1 as well as some CSS 3
  4329. modules:
  4330. @itemize
  4331. @item CSS Color 3
  4332. @item CSS Fonts 3
  4333. @item CSS Paged Media 3
  4334. @end itemize")
  4335. (license license:bsd-3)))
  4336. (define-public python-tinycss2
  4337. (package
  4338. (name "python-tinycss2")
  4339. (version "1.1.0")
  4340. (source
  4341. (origin
  4342. (method git-fetch)
  4343. (uri (git-reference
  4344. (url "https://github.com/Kozea/tinycss2")
  4345. (commit (string-append "v" version))
  4346. (recursive? #true)))
  4347. (file-name (git-file-name name version))
  4348. (sha256
  4349. (base32 "0zyc48vbmczpqj7f3f0d7zb3bz29fyj50dg0m6bbwbr5i88kq3sq"))))
  4350. (build-system python-build-system)
  4351. (arguments
  4352. `(#:phases
  4353. (modify-phases %standard-phases
  4354. (replace 'build
  4355. (lambda _
  4356. ;; A ZIP archive should be generated, but it fails with "ZIP does
  4357. ;; not support timestamps before 1980". Luckily,
  4358. ;; SOURCE_DATE_EPOCH is respected, which we set to some time in
  4359. ;; 1980.
  4360. (setenv "SOURCE_DATE_EPOCH" "315532800")
  4361. (invoke "flit" "build")))
  4362. (replace 'install
  4363. (lambda* (#:key inputs outputs #:allow-other-keys)
  4364. (add-installed-pythonpath inputs outputs)
  4365. (let ((out (assoc-ref outputs "out")))
  4366. (for-each (lambda (wheel)
  4367. (format #true wheel)
  4368. (invoke "python" "-m" "pip" "install"
  4369. wheel (string-append "--prefix=" out)))
  4370. (find-files "dist" "\\.whl$")))))
  4371. (replace 'check
  4372. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  4373. (add-installed-pythonpath inputs outputs)
  4374. (invoke "pytest" "-vv"))))))
  4375. (propagated-inputs
  4376. (list python-webencodings))
  4377. (native-inputs
  4378. (list python-flit python-pytest python-pytest-cov
  4379. python-pytest-flake8 python-pytest-isort))
  4380. (home-page "https://tinycss2.readthedocs.io/")
  4381. (synopsis "Low-level CSS parser for Python")
  4382. (description "@code{tinycss2} can parse strings, return Python objects
  4383. representing tokens and blocks, and generate CSS strings corresponding to
  4384. these objects.
  4385. Based on the CSS Syntax Level 3 specification, @code{tinycss2} knows the
  4386. grammar of CSS but doesn’t know specific rules, properties or values supported
  4387. in various CSS modules.")
  4388. (license license:bsd-3)))
  4389. (define-public python-cssselect2
  4390. (package
  4391. (name "python-cssselect2")
  4392. (version "0.4.1")
  4393. (source
  4394. (origin
  4395. (method url-fetch)
  4396. (uri (pypi-uri "cssselect2" version))
  4397. (sha256
  4398. (base32 "1j2fcr217rsvkipsg6zjq03rl64rxnvb5hqqpx0dv58fhspvkywk"))))
  4399. (build-system python-build-system)
  4400. (arguments
  4401. `(#:phases
  4402. (modify-phases %standard-phases
  4403. (add-after 'unpack 'disable-linters
  4404. ;; Their check fails; none of our business.
  4405. (lambda _
  4406. (substitute* '("setup.py" "pyproject.toml")
  4407. (("'pytest-flake8',") "")
  4408. (("'pytest-isort',") "")
  4409. (("--flake8") "")
  4410. (("--isort") ""))))
  4411. (replace 'check
  4412. (lambda* (#:key tests? #:allow-other-keys)
  4413. (when tests?
  4414. (lambda _ (invoke "pytest"))))))))
  4415. (propagated-inputs
  4416. (list python-tinycss2))
  4417. (native-inputs
  4418. (list python-pytest-cov python-pytest-runner))
  4419. (home-page "https://cssselect2.readthedocs.io/")
  4420. (synopsis "CSS selectors for Python ElementTree")
  4421. (description "@code{cssselect2} is a straightforward implementation of
  4422. CSS3 Selectors for markup documents (HTML, XML, etc.) that can be read by
  4423. ElementTree-like parsers (including cElementTree, lxml, html5lib, etc.).
  4424. Unlike the Python package @code{cssselect}, it does not translate selectors to
  4425. XPath and therefore does not have all the correctness corner cases that are
  4426. hard or impossible to fix in cssselect.")
  4427. (license license:bsd-3)))
  4428. (define-public python-uvloop
  4429. (package
  4430. (name "python-uvloop")
  4431. (version "0.16.0")
  4432. (source
  4433. (origin
  4434. (method url-fetch)
  4435. (uri (pypi-uri "uvloop" version))
  4436. (sha256
  4437. (base32 "0a0jzwrhkszknh14alflrp1db6dyjp7ph730f9yc5lb7gc6c4jzp"))
  4438. (modules '((guix build utils)))
  4439. (snippet
  4440. '(begin (delete-file-recursively "vendor")
  4441. (delete-file "uvloop/loop.c")))))
  4442. (build-system python-build-system)
  4443. (arguments
  4444. `(#:phases
  4445. (modify-phases %standard-phases
  4446. (add-after 'unpack 'preparations
  4447. (lambda _
  4448. ;; Use packaged libuv.
  4449. (substitute* "setup.py" (("self.use_system_libuv = False")
  4450. "self.use_system_libuv = True"))
  4451. ;; Replace hardcoded shell command.
  4452. (substitute* "uvloop/loop.pyx"
  4453. (("b'/bin/sh'") (string-append "b'" (which "sh") "'")))
  4454. #t))
  4455. (replace 'check
  4456. (lambda* (#:key tests? #:allow-other-keys)
  4457. (when tests?
  4458. ;; Remove Python module, which conflicts with the installed version,
  4459. ;; but lacks the built C module.
  4460. (delete-file-recursively "uvloop")
  4461. ;; The tests are prone to get stuck. Use pytest-timeout’s --timeout
  4462. ;; flag to get a meaningful idea about where.
  4463. (invoke "pytest" "-vv" "--timeout=300"
  4464. "-k" ,(string-append
  4465. ;; Timeout, because SIGINT cannot be sent to child.
  4466. "not test_signals_sigint_pycode_continue "
  4467. "and not test_signals_sigint_pycode_stop "
  4468. "and not test_signals_sigint_uvcode "
  4469. "and not test_signals_sigint_uvcode_two_loop_runs "
  4470. ;; It looks like pytest is preventing
  4471. ;; custom stdout/stderr redirection,
  4472. ;; even with -s.
  4473. "and not test_process_streams_redirect "))))))))
  4474. (native-inputs
  4475. (list python-aiohttp
  4476. python-cython
  4477. python-psutil
  4478. python-pyopenssl
  4479. python-pytest
  4480. python-pytest-timeout))
  4481. (inputs
  4482. (list libuv))
  4483. (home-page "https://github.com/MagicStack/uvloop")
  4484. (synopsis "Fast implementation of asyncio event loop on top of libuv")
  4485. (description
  4486. "@code{uvloop} is a fast, drop-in replacement of the built-in asyncio
  4487. event loop. It is implemented in Cython and uses libuv under the hood.")
  4488. (license license:expat)))
  4489. (define-public gunicorn
  4490. (package
  4491. (name "gunicorn")
  4492. (version "20.1.0")
  4493. (source
  4494. (origin
  4495. (method url-fetch)
  4496. (uri (pypi-uri "gunicorn" version))
  4497. (sha256
  4498. (base32
  4499. "1s7670qw36x90bgmazmgib170i5gnpyb2ypxzlla7y0mpasniag0"))))
  4500. (outputs '("out" "doc"))
  4501. (build-system python-build-system)
  4502. (arguments
  4503. `(#:phases
  4504. (modify-phases %standard-phases
  4505. (add-after 'build 'build-doc
  4506. (lambda _
  4507. (invoke "make" "-C" "docs" "PAPER=a4" "html" "info")
  4508. (delete-file "docs/build/texinfo/Makefile")
  4509. (delete-file "docs/build/texinfo/Gunicorn.texi")))
  4510. (replace 'check
  4511. (lambda* (#:key tests? #:allow-other-keys)
  4512. (if tests?
  4513. (begin
  4514. (invoke "pytest" "-vv"
  4515. ;; Disable the geventlet tests because eventlet uses
  4516. ;; dnspython, which does not work in the build
  4517. ;; container due to lack of /etc/resolv.conf, etc.
  4518. "--ignore=tests/workers/test_geventlet.py"))
  4519. (format #t "test suite not run~%"))))
  4520. (add-after 'install 'install-doc
  4521. (lambda* (#:key outputs #:allow-other-keys)
  4522. (let* ((doc (string-append (assoc-ref outputs "doc")
  4523. "/share/doc/" ,name "-" ,version))
  4524. (html (string-append doc "/html"))
  4525. (info (string-append doc "/info"))
  4526. (examples (string-append doc "/examples")))
  4527. (mkdir-p html)
  4528. (mkdir-p info)
  4529. (mkdir-p examples)
  4530. (copy-recursively "docs/build/html" html)
  4531. (copy-recursively "docs/build/texinfo" info)
  4532. (copy-recursively "examples" examples)
  4533. (for-each (lambda (file)
  4534. (copy-file file (string-append doc "/" file)))
  4535. '("README.rst" "NOTICE" "LICENSE" "THANKS")))))
  4536. ;; XXX: The wrap phase includes native inputs on PYTHONPATH, (see
  4537. ;; <https://bugs.gnu.org/25235>), leading to an inflated closure
  4538. ;; size. Override it to only add the essential entries.
  4539. (replace 'wrap
  4540. (lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
  4541. (let* ((out (assoc-ref outputs "out"))
  4542. (python (assoc-ref (or native-inputs inputs) "python"))
  4543. (sitedir (string-append "/lib/python"
  4544. (python-version python)
  4545. "/site-packages")))
  4546. (wrap-program (string-append out "/bin/gunicorn")
  4547. `("PYTHONPATH" ":" prefix
  4548. ,(map (lambda (output)
  4549. (string-append output sitedir))
  4550. (list python out))))))))))
  4551. (native-inputs
  4552. (list binutils ;; for ctypes.util.find_library()
  4553. python-aiohttp
  4554. python-gevent
  4555. python-pytest
  4556. python-pytest-cov
  4557. python-sphinx
  4558. texinfo))
  4559. (home-page "https://gunicorn.org/")
  4560. (synopsis "Python WSGI HTTP Server for UNIX")
  4561. (description "Gunicorn ‘Green Unicorn’ is a Python WSGI HTTP
  4562. Server for UNIX. It’s a pre-fork worker model ported from Ruby’s
  4563. Unicorn project. The Gunicorn server is broadly compatible with
  4564. various web frameworks, simply implemented, light on server resources,
  4565. and fairly speedy.")
  4566. (license license:expat)))
  4567. ;; break cyclic dependency for python-aiohttp, which depends on gunicorn for
  4568. ;; its tests
  4569. (define-public gunicorn-bootstrap
  4570. (package
  4571. (inherit gunicorn)
  4572. (name "gunicorn")
  4573. (arguments `(#:tests? #f))
  4574. (properties '((hidden? . #t)))
  4575. (native-inputs `())))
  4576. (define-public python-httptools
  4577. (package
  4578. (name "python-httptools")
  4579. (version "0.1.1")
  4580. (source
  4581. (origin
  4582. ;; PyPI tarball comes with a vendored http-parser and no tests.
  4583. (method git-fetch)
  4584. (uri (git-reference
  4585. (url "https://github.com/MagicStack/httptools")
  4586. (commit (string-append "v" version))))
  4587. (file-name (git-file-name name version))
  4588. (sha256
  4589. (base32 "0g08128x2ixsiwrzskxc6c8ymgzs39wbzr5mhy0mjk30q9pqqv77"))))
  4590. (build-system python-build-system)
  4591. (arguments
  4592. '(#:phases
  4593. (modify-phases %standard-phases
  4594. (add-after 'unpack 'preparations
  4595. (lambda _
  4596. ;; Skip a failing test (AssertionError). Bug report:
  4597. ;; https://github.com/MagicStack/httptools/issues/10.
  4598. (substitute* "tests/test_parser.py"
  4599. ((" def test_parser_response_1")
  4600. (string-append
  4601. " @unittest.skip(\"Disabled.\")\n"
  4602. " def test_parser_response_1")))
  4603. ;; Use packaged http-parser.
  4604. (substitute* "setup.py" (("self.use_system_http_parser = False")
  4605. "self.use_system_http_parser = True"))
  4606. ;; This path is hardcoded. Hardcode our own.
  4607. (substitute* "httptools/parser/cparser.pxd"
  4608. (("../../vendor/http-parser")
  4609. (string-append (assoc-ref %build-inputs "http-parser")
  4610. "/include")))
  4611. ;; Don't force Cython version.
  4612. (substitute* "setup.py" (("Cython==") "Cython>="))
  4613. #t)))))
  4614. (native-inputs
  4615. (list python-cython python-pytest))
  4616. (inputs
  4617. (list http-parser))
  4618. (home-page "https://github.com/MagicStack/httptools")
  4619. (synopsis "Collection of framework independent HTTP protocol utils")
  4620. (description
  4621. "@code{httptools} is a Python binding for the nodejs HTTP parser.")
  4622. (license license:expat)))
  4623. (define-public python-uvicorn
  4624. (package
  4625. (name "python-uvicorn")
  4626. (version "0.13.2")
  4627. (source
  4628. (origin
  4629. ;; PyPI tarball has no tests.
  4630. (method git-fetch)
  4631. (uri (git-reference
  4632. (url "https://github.com/encode/uvicorn")
  4633. (commit version)))
  4634. (file-name (git-file-name name version))
  4635. (sha256
  4636. (base32 "04zgmp9z46k72ay6cz7plga6d3w3a6x41anabm7ramp7jdqf6na9"))))
  4637. (build-system python-build-system)
  4638. (arguments
  4639. `(#:phases
  4640. (modify-phases %standard-phases
  4641. (replace 'check
  4642. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  4643. (add-installed-pythonpath inputs outputs)
  4644. (invoke "pytest" "-vv"))))))
  4645. (native-inputs
  4646. (list python-pytest python-pytest-mock python-requests
  4647. python-trustme python-wsproto))
  4648. (propagated-inputs
  4649. (list python-click
  4650. python-h11
  4651. python-httptools
  4652. python-pyyaml
  4653. python-uvloop
  4654. python-watchgod
  4655. python-websockets))
  4656. (home-page "https://github.com/encode/uvicorn")
  4657. (synopsis "Fast ASGI server implementation")
  4658. (description
  4659. "@code{uvicorn} is a fast ASGI server implementation, using @code{uvloop}
  4660. and @code{httptools}. It currently supports HTTP/1.1 and WebSockets. Support
  4661. for HTTP/2 is planned.")
  4662. (license license:bsd-3)))
  4663. (define-public python-translation-finder
  4664. (package
  4665. (name "python-translation-finder")
  4666. (version "1.7")
  4667. (source
  4668. (origin
  4669. (method url-fetch)
  4670. (uri (pypi-uri "translation-finder" version))
  4671. (sha256
  4672. (base32
  4673. "1pcy9z8gmb8x41gjhw9x0lkr0d2mv5mdxcs2hwg6q8mxs857j589"))))
  4674. (build-system python-build-system)
  4675. (arguments
  4676. `(#:phases
  4677. (modify-phases %standard-phases
  4678. (add-before 'build 'remove-failing-test
  4679. (lambda _
  4680. (delete-file "translation_finder/test_api.py")
  4681. #t)))))
  4682. (propagated-inputs
  4683. (list python-chardet python-pathlib2 python-ruamel.yaml python-six))
  4684. (native-inputs
  4685. (list python-codecov python-codacy-coverage python-pytest-cov
  4686. python-pytest-runner python-twine))
  4687. (home-page "https://weblate.org/")
  4688. (synopsis "Translation file finder for Weblate")
  4689. (description "This package provides a function to find translation file in
  4690. the source code of a project. It supports many translation file formats and
  4691. is part of the Weblate translation platform.")
  4692. (license license:gpl3+)))
  4693. (define-public python-gitlab
  4694. (package
  4695. (name "python-gitlab")
  4696. (version "3.2.0")
  4697. (source (origin
  4698. (method url-fetch)
  4699. (uri (pypi-uri "python-gitlab" version))
  4700. (sha256
  4701. (base32
  4702. "1gi4lp2g4k99zqcx2bgqx940bpmpbc1w9qkl5gy33hpy148yhvlg"))))
  4703. (build-system python-build-system)
  4704. (arguments
  4705. `(#:tests? #f)) ;tests require network access
  4706. (propagated-inputs (list python-requests python-requests-toolbelt))
  4707. (home-page "https://github.com/python-gitlab/python-gitlab")
  4708. (synopsis "Interact with GitLab API")
  4709. (description "This package provides an extended library for interacting
  4710. with GitLab instances through their API.")
  4711. (license license:lgpl3+)))
  4712. (define-public python-path-and-address
  4713. (package
  4714. (name "python-path-and-address")
  4715. (version "2.0.1")
  4716. (source
  4717. (origin
  4718. ;; The source distributed on PyPI doesn't include tests.
  4719. (method git-fetch)
  4720. (uri (git-reference
  4721. (url "https://github.com/joeyespo/path-and-address")
  4722. (commit (string-append "v" version))))
  4723. (file-name (git-file-name name version))
  4724. (sha256
  4725. (base32
  4726. "0b0afpsaim06mv3lhbpm8fmawcraggc11jhzr6h72kdj1cqjk5h6"))))
  4727. (build-system python-build-system)
  4728. (arguments
  4729. `(#:phases
  4730. (modify-phases %standard-phases
  4731. (replace 'check
  4732. (lambda* (#:key inputs outputs #:allow-other-keys)
  4733. (add-installed-pythonpath inputs outputs)
  4734. (invoke "py.test"))))))
  4735. (native-inputs
  4736. (list python-pytest))
  4737. (home-page "https://github.com/joeyespo/path-and-address")
  4738. (synopsis "Functions for command-line server tools used by humans")
  4739. (description "Path-and-address resolves ambiguities of command-line
  4740. interfaces, inferring which argument is the path, and which is the address.")
  4741. (license license:expat)))
  4742. (define-public grip
  4743. ;; No release by upstream for quite some time, some bugs fixed since. See:
  4744. ;; https://github.com/joeyespo/grip/issues/304
  4745. (let ((commit "27a4d6d87ea1d0ea7f7f120de55baabee3de73e3"))
  4746. (package
  4747. (name "grip")
  4748. (version (git-version "4.5.2" "1" commit))
  4749. (source
  4750. (origin
  4751. (method git-fetch)
  4752. (uri (git-reference
  4753. (url "https://github.com/joeyespo/grip")
  4754. (commit commit)))
  4755. (file-name (git-file-name name version))
  4756. (sha256
  4757. (base32
  4758. "0kx5hgb3q19i4l18a4vqdq9af390xgpk88lp2ay75qi96k0dc68w"))))
  4759. (build-system python-build-system)
  4760. (propagated-inputs
  4761. (list python-docopt
  4762. python-flask
  4763. python-markdown
  4764. python-path-and-address
  4765. python-pygments
  4766. python-requests))
  4767. (native-inputs
  4768. (list python-pytest python-responses))
  4769. (arguments
  4770. `(#:phases
  4771. (modify-phases %standard-phases
  4772. (replace 'check
  4773. (lambda* (#:key inputs outputs #:allow-other-keys)
  4774. (add-installed-pythonpath inputs outputs)
  4775. (setenv "PATH" (string-append
  4776. (getenv "PATH") ":"
  4777. (assoc-ref %outputs "out") "/bin"))
  4778. (invoke "py.test" "-m" "not assumption"))))))
  4779. (home-page "https://github.com/joeyespo/grip")
  4780. (synopsis "Preview Markdown files using the GitHub API")
  4781. (description "Grip is a command-line server application written in Python
  4782. that uses the GitHub Markdown API to render a local Markdown file. The styles
  4783. and rendering come directly from GitHub, so you'll know exactly how it will
  4784. appear. Changes you make to the file will be instantly reflected in the browser
  4785. without requiring a page refresh.")
  4786. (license license:expat))))
  4787. (define-public python-port-for
  4788. (package
  4789. (name "python-port-for")
  4790. (version "0.4")
  4791. (source
  4792. (origin
  4793. (method url-fetch)
  4794. (uri (pypi-uri "port-for" version))
  4795. (sha256
  4796. (base32
  4797. "1pncxlj25ggw99r0ijfbkq70gd7cbhqdx5ivsxy4jdp0z14cpda7"))))
  4798. (build-system python-build-system)
  4799. (arguments
  4800. `(#:phases
  4801. (modify-phases %standard-phases
  4802. (add-after 'unpack 'use-urllib3
  4803. (lambda _
  4804. (substitute* "port_for/_download_ranges.py"
  4805. (("urllib2") "urllib3")))))))
  4806. (propagated-inputs
  4807. (list python-urllib3))
  4808. (native-inputs
  4809. (list python-mock))
  4810. (home-page "https://github.com/kmike/port-for/")
  4811. (synopsis "TCP localhost port finder and association manager")
  4812. (description
  4813. "This package provides a utility that helps with local TCP ports
  4814. management. It can find an unused TCP localhost port and remember the
  4815. association.")
  4816. (license license:expat)))
  4817. (define-public python-livereload
  4818. (package
  4819. (name "python-livereload")
  4820. (version "2.6.3")
  4821. (source
  4822. (origin
  4823. (method url-fetch)
  4824. (uri (pypi-uri "livereload" version))
  4825. (sha256
  4826. (base32
  4827. "0scqjnhg3ap81v36ghp0pik774dnfdkwqsx5j1jfbzarbs32yvvp"))))
  4828. (build-system python-build-system)
  4829. (propagated-inputs
  4830. (list python-six python-tornado))
  4831. (home-page "https://github.com/lepture/python-livereload")
  4832. (synopsis "Python LiveReload")
  4833. (description
  4834. "Python LiveReload provides a command line utility, @command{livereload},
  4835. for starting a web server in a directory. It can trigger arbitrary commands
  4836. and serve updated contents upon changes to the directory.")
  4837. (license license:bsd-3)))
  4838. (define-public python-vf-1
  4839. (package
  4840. (name "python-vf-1")
  4841. (version "0.0.11")
  4842. (source
  4843. (origin
  4844. (method url-fetch)
  4845. (uri (pypi-uri "VF-1" version))
  4846. (sha256
  4847. (base32
  4848. "0xlqsaxsiayk1sd07kpz8abbcnab582y29a1y4882fq6j4gma5xi"))))
  4849. (build-system python-build-system)
  4850. (home-page "https://github.com/solderpunk/VF-1")
  4851. (synopsis "Command line gopher client")
  4852. (description "@code{VF-1} is a command line gopher client with
  4853. @acronym{TLS, Transport Layer Security} support.")
  4854. (license license:bsd-2)))
  4855. (define-public python-httpcore
  4856. (package
  4857. (name "python-httpcore")
  4858. (version "0.12.2")
  4859. (source
  4860. (origin
  4861. ;; PyPI tarball does not contain tests.
  4862. (method git-fetch)
  4863. (uri (git-reference
  4864. (url "https://github.com/encode/httpcore")
  4865. (commit version)))
  4866. (file-name (git-file-name name version))
  4867. (sha256
  4868. (base32 "1nrwwfdqjfc2a1k3j41cdwkprwvplf95fwmypdl2aq2qgp3209q0"))))
  4869. (build-system python-build-system)
  4870. (arguments
  4871. `(#:tests? #f ; Tests hang at 98%
  4872. #:phases
  4873. (modify-phases %standard-phases
  4874. (replace 'check
  4875. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  4876. (when tests?
  4877. (add-installed-pythonpath inputs outputs)
  4878. (invoke "pytest" "-vv" "--cov=httpcore"
  4879. "--cov=tests" "tests"))
  4880. #t)))))
  4881. (native-inputs
  4882. (list python-autoflake
  4883. python-flake8
  4884. python-flake8-bugbear
  4885. python-flake8-pie
  4886. python-isort
  4887. python-mypy
  4888. python-pytest
  4889. python-pytest-asyncio
  4890. python-pytest-cov
  4891. python-pytest-trio
  4892. python-uvicorn
  4893. python-trustme))
  4894. (propagated-inputs
  4895. (list python-h11 python-h2 python-sniffio python-trio
  4896. python-trio-typing))
  4897. (home-page "https://github.com/encode/httpcore")
  4898. (synopsis "Minimal, low-level HTTP client")
  4899. (description
  4900. "HTTP Core provides a minimal and low-level HTTP client, which does one
  4901. thing only: send HTTP requests.
  4902. Some things HTTP Core does do:
  4903. @itemize
  4904. @item Sending HTTP requests.
  4905. @item Provides both sync and async interfaces.
  4906. @item Supports HTTP/1.1 and HTTP/2.
  4907. @item Async backend support for asyncio and trio.
  4908. @item Automatic connection pooling.
  4909. @item HTTP(S) proxy support.
  4910. @end itemize")
  4911. (license license:bsd-3)))
  4912. (define-public python-httpx
  4913. (package
  4914. (name "python-httpx")
  4915. (version "0.16.1")
  4916. (source
  4917. (origin
  4918. ;; PyPI tarball does not contain tests.
  4919. (method git-fetch)
  4920. (uri (git-reference
  4921. (url "https://github.com/encode/httpx")
  4922. (commit version)))
  4923. (file-name (git-file-name name version))
  4924. (sha256
  4925. (base32 "00gmq45fckcqkj910bvd7pyqz1mvgsdvz4s0k7dzbnc5czzq1f4a"))))
  4926. (build-system python-build-system)
  4927. (arguments
  4928. `(#:phases
  4929. (modify-phases %standard-phases
  4930. (replace 'check
  4931. (lambda* (#:key tests? #:allow-other-keys)
  4932. (when tests?
  4933. (invoke "pytest" "-vv" "-k"
  4934. ;; These tests try to open an outgoing connection.
  4935. (string-append
  4936. "not test_connect_timeout"
  4937. " and not test_that_send_cause_async_client_to_be_not_"
  4938. "closed"
  4939. " and not test_that_async_client_caused_warning_when_"
  4940. "being_deleted"
  4941. " and not test_that_send_cause_client_to_be_not_closed"
  4942. " and not test_async_proxy_close"
  4943. " and not test_sync_proxy_close"))))))))
  4944. (native-inputs
  4945. (list python-autoflake
  4946. python-black
  4947. python-cryptography
  4948. python-flake8
  4949. python-flake8-bugbear
  4950. python-flake8-pie
  4951. python-isort
  4952. python-mypy
  4953. python-pytest
  4954. python-pytest-asyncio
  4955. python-pytest-trio
  4956. python-pytest-cov
  4957. python-trio
  4958. python-trio-typing
  4959. python-trustme
  4960. python-uvicorn))
  4961. (propagated-inputs
  4962. (list python-brotli
  4963. python-certifi
  4964. python-chardet
  4965. python-httpcore
  4966. python-idna
  4967. python-rfc3986
  4968. python-sniffio))
  4969. (home-page "https://www.python-httpx.org/")
  4970. (synopsis "HTTP client for Python")
  4971. (description
  4972. "HTTPX is a fully featured HTTP client for Python 3, which provides sync
  4973. and async APIs, and support for both HTTP/1.1 and HTTP/2.
  4974. HTTPX builds on the well-established usability of requests, and gives you:
  4975. @itemize
  4976. @item A broadly requests-compatible API.
  4977. @item Standard synchronous interface, but with async support if you need it.
  4978. @item HTTP/1.1 and HTTP/2 support.
  4979. @item Ability to make requests directly to WSGI applications or ASGI applications.
  4980. @item Strict timeouts everywhere.
  4981. @item Fully type annotated.
  4982. @item 99% test coverage.
  4983. @end itemize
  4984. Plus all the standard features of requests:
  4985. @itemize
  4986. @item International Domains and URLs
  4987. @item Keep-Alive & Connection Pooling
  4988. @item Sessions with Cookie Persistence
  4989. @item Browser-style SSL Verification
  4990. @item Basic/Digest Authentication
  4991. @item Elegant Key/Value Cookies
  4992. @item Automatic Decompression
  4993. @item Automatic Content Decoding
  4994. @item Unicode Response Bodies
  4995. @item Multipart File Uploads
  4996. @item HTTP(S) Proxy Support
  4997. @item Connection Timeouts
  4998. @item Streaming Downloads
  4999. @item .netrc Support
  5000. @item Chunked Requests
  5001. @end itemize")
  5002. (license license:bsd-3)))
  5003. (define-public python-wsgiprox
  5004. (package
  5005. (name "python-wsgiprox")
  5006. (version "1.5.2")
  5007. (source
  5008. (origin
  5009. (method url-fetch)
  5010. (uri (pypi-uri "wsgiprox" version))
  5011. (sha256
  5012. (base32
  5013. "11fsm199pvwbmqx2lccznvws65aam1rqqv0w79gal8hispwgd5rs"))))
  5014. (build-system python-build-system)
  5015. (arguments
  5016. ;; The test suite hangs (see:
  5017. ;; https://github.com/webrecorder/wsgiprox/issues/6).
  5018. `(#:tests? #f
  5019. #:phases
  5020. (modify-phases %standard-phases
  5021. (add-after 'unpack 'fix-pytest-argument
  5022. (lambda _
  5023. ;; See: https://github.com/webrecorder/wsgiprox/issues/7.
  5024. (substitute* "setup.py"
  5025. (("--doctest-module")
  5026. "--doctest-modules")))))))
  5027. (propagated-inputs
  5028. (list python-certauth python-gevent python-websocket-client))
  5029. (native-inputs
  5030. (list python-mock python-pytest-cov python-waitress))
  5031. (home-page "https://github.com/webrecorder/wsgiprox")
  5032. (synopsis "HTTP/S proxy with WebSockets over WSGI")
  5033. (description "@code{wsgiprox} is a Python WSGI (Web Server Gateway
  5034. Interface) middle-ware for adding HTTP and HTTPS proxy support to a WSGI
  5035. application. The library accepts HTTP and HTTPS proxy connections, and routes
  5036. them to a designated prefix.")
  5037. (license license:asl2.0)))
  5038. (define-public python-warcio
  5039. ;; The PyPI release is missing some test support files (see:
  5040. ;; https://github.com/webrecorder/warcio/issues/132).
  5041. (let ((revision "0")
  5042. (commit "aa702cb321621b233c6e5d2a4780151282a778be"))
  5043. (package
  5044. (name "python-warcio")
  5045. (version (git-version "1.7.4" revision commit))
  5046. (source
  5047. (origin
  5048. (method git-fetch)
  5049. (uri (git-reference
  5050. (url "https://github.com/webrecorder/warcio")
  5051. (commit commit)))
  5052. (file-name (git-file-name name version))
  5053. (sha256
  5054. (base32
  5055. "11afr6zy3r6rda81010iq496dazg4xid0izg3smg6ighpmvsnzf2"))))
  5056. (build-system python-build-system)
  5057. (arguments
  5058. (list
  5059. #:phases
  5060. #~(modify-phases %standard-phases
  5061. (replace 'check
  5062. (lambda* (#:key tests? #:allow-other-keys)
  5063. (when tests?
  5064. (invoke "pytest" "-vv"
  5065. ;; These tests fail due to networking requirements.
  5066. "-k" (format #f "not ~a"
  5067. (string-join
  5068. '("test_post_chunked"
  5069. "test_remote"
  5070. "test_capture_http_proxy"
  5071. "test_capture_https_proxy"
  5072. "test_capture_https_proxy_same_session")
  5073. " and not ")))))))))
  5074. (native-inputs
  5075. ;; These inputs are required for the test suite.
  5076. (list python-httpbin python-pytest-cov python-requests
  5077. python-wsgiprox))
  5078. (home-page "https://github.com/webrecorder/warcio")
  5079. (synopsis "Streaming web archival archive (WARC) library")
  5080. (description "warcio is a Python library to read and write the WARC format
  5081. commonly used in Web archives. It is designed for fast, low-level access to
  5082. web archival content, oriented around a stream of WARC records rather than
  5083. files.")
  5084. (license license:asl2.0))))
  5085. (define-public python-websockets
  5086. (package
  5087. (name "python-websockets")
  5088. (version "8.1")
  5089. (source
  5090. (origin
  5091. (method url-fetch)
  5092. (uri (pypi-uri "websockets" version))
  5093. (sha256
  5094. (base32
  5095. "03s3ml6sbki24aajllf8aily0xzrn929zxi84p50zkkbikdd4raw"))))
  5096. (build-system python-build-system)
  5097. (arguments
  5098. '(#:tests? #f ; Tests not included in release tarball.
  5099. #:phases
  5100. (modify-phases %standard-phases
  5101. (add-after 'unpack 'fix-websockets-package-name-requirement
  5102. (lambda* (#:key inputs #:allow-other-keys)
  5103. ;; Python package names use dot as separator.
  5104. (substitute* "setup.py"
  5105. (("websockets/extensions") "websockets.extensions")))))))
  5106. (home-page "https://github.com/aaugustin/websockets")
  5107. (synopsis
  5108. "Python implementation of the WebSocket Protocol (RFC 6455 & 7692)")
  5109. (description
  5110. "@code{websockets} is a library for building WebSocket servers and clients
  5111. in Python with a focus on correctness and simplicity.
  5112. Built on top of @code{asyncio}, Python's standard asynchronous I/O framework,
  5113. it provides an elegant coroutine-based API.")
  5114. (license license:bsd-3)))
  5115. (define-public python-selenium
  5116. (package
  5117. (name "python-selenium")
  5118. (version "3.141.0")
  5119. (source
  5120. (origin
  5121. (method url-fetch)
  5122. (uri (pypi-uri "selenium" version))
  5123. (sha256
  5124. (base32
  5125. "039hf9knvl4s3hp21bzwsp1g5ri9gxsh504dp48lc6nr1av35byy"))))
  5126. (build-system python-build-system)
  5127. (propagated-inputs
  5128. (list python-urllib3))
  5129. (home-page
  5130. "https://github.com/SeleniumHQ/selenium/")
  5131. (synopsis "Python bindings for Selenium")
  5132. (description "Selenium enables web browser automation.
  5133. Selenium specifically provides infrastructure for the W3C WebDriver specification
  5134. — a platform and language-neutral coding interface compatible with all
  5135. major web browsers.")
  5136. (license license:asl2.0)))
  5137. (define-public python-rapidjson
  5138. (package
  5139. (name "python-rapidjson")
  5140. (version "0.9.1")
  5141. (source
  5142. (origin
  5143. (method url-fetch)
  5144. (uri (pypi-uri "python-rapidjson" version))
  5145. (sha256
  5146. (base32
  5147. "18cl2dhx3gds5vg52jxmh9wjlbiy8dx06c3n482rfpdi9dzbv05d"))
  5148. (modules '((guix build utils)))
  5149. (snippet
  5150. '(begin (delete-file-recursively "rapidjson") #t))))
  5151. (build-system python-build-system)
  5152. (arguments
  5153. `(#:configure-flags
  5154. (list (string-append "--rj-include-dir="
  5155. (assoc-ref %build-inputs "rapidjson")
  5156. "/include/rapidjson"))
  5157. #:phases
  5158. (modify-phases %standard-phases
  5159. (replace 'build
  5160. (lambda* (#:key inputs #:allow-other-keys)
  5161. (invoke "python" "setup.py" "build"
  5162. (string-append "--rj-include-dir="
  5163. (assoc-ref %build-inputs "rapidjson")
  5164. "/include/rapidjson"))))
  5165. (replace 'check
  5166. (lambda* (#:key inputs outputs #:allow-other-keys)
  5167. (add-installed-pythonpath inputs outputs)
  5168. ;; Some tests are broken.
  5169. (delete-file "tests/test_base_types.py")
  5170. (delete-file "tests/test_validator.py")
  5171. (invoke "python" "-m" "pytest" "tests"))))))
  5172. (native-inputs
  5173. (list rapidjson python-pytest python-pytz))
  5174. (home-page "https://github.com/python-rapidjson/python-rapidjson")
  5175. (synopsis "Python wrapper around rapidjson")
  5176. (description "This package provides a python wrapper around rapidjson.")
  5177. (license license:expat)))
  5178. (define-public python-venusian
  5179. (package
  5180. (name "python-venusian")
  5181. (version "3.0.0")
  5182. (source
  5183. (origin
  5184. (method url-fetch)
  5185. (uri (pypi-uri "venusian" version))
  5186. (sha256
  5187. (base32 "0f7f67dkgxxcjfhpdd5frb9pszkf04lyzzpn5069q0xi89r2p17n"))))
  5188. (build-system python-build-system)
  5189. (native-inputs
  5190. `(("python-pytest" ,python-pytest)
  5191. ("python-runner" ,python-pytest-runner)
  5192. ("python-pytest-cov" ,python-pytest-cov)))
  5193. (arguments '(#:test-target "pytest"))
  5194. (home-page "https://docs.pylonsproject.org/projects/venusian")
  5195. (synopsis "Library for deferring decorator actions")
  5196. (description
  5197. "Venusian is a library which allows framework authors to defer decorator
  5198. actions. Instead of taking actions when a function (or class) decorator is
  5199. executed at import time, you can defer the action usually taken by the
  5200. decorator until a separate scan phase.")
  5201. (license license:repoze)))
  5202. (define-public python-zope-deprecation
  5203. (package
  5204. (name "python-zope-deprecation")
  5205. (version "4.4.0")
  5206. (source (origin
  5207. (method url-fetch)
  5208. (uri (pypi-uri "zope.deprecation" version))
  5209. (sha256
  5210. (base32
  5211. "1pz2cv7gv9y1r3m0bdv7ks1alagmrn5msm5spwdzkb2by0w36i8d"))))
  5212. (build-system python-build-system)
  5213. (native-inputs `())
  5214. (propagated-inputs `())
  5215. (home-page "https://zopedeprecation.readthedocs.io/")
  5216. (synopsis "Function for marking deprecations")
  5217. (description "The @code{zope.deprecation} module provides a function for
  5218. marking modules, classes, functions, methods and properties as deprecated,
  5219. displaying warnings when usaged in application code.")
  5220. (license license:zpl2.1)))
  5221. (define-public python-translationstring
  5222. (package
  5223. (name "python-translationstring")
  5224. (version "1.3")
  5225. (source (origin
  5226. (method url-fetch)
  5227. (uri (pypi-uri "translationstring" version))
  5228. (sha256
  5229. (base32
  5230. "0bdpcnd9pv0131dl08h4zbcwmgc45lyvq3pa224xwan5b3x4rr2f"))))
  5231. (build-system python-build-system)
  5232. (home-page "http://docs.pylonsproject.org/projects/translationstring")
  5233. (synopsis "Internationalization tooling for the Pylons project")
  5234. (description "This package provides a library used by various Pylons
  5235. project packages for internationalization (i18n) duties related to
  5236. translation.")
  5237. (license license:repoze)))
  5238. (define-public python-plaster
  5239. (package
  5240. (name "python-plaster")
  5241. (version "1.0")
  5242. (source (origin
  5243. (method url-fetch)
  5244. (uri (pypi-uri "plaster" version))
  5245. (sha256
  5246. (base32
  5247. "1hy8k0nv2mxq94y5aysk6hjk9ryb4bsd13g83m60hcyzxz3wflc3"))))
  5248. (build-system python-build-system)
  5249. (native-inputs
  5250. (list python-pytest))
  5251. (home-page "https://docs.pylonsproject.org/projects/plaster/en/latest/")
  5252. (synopsis "Configuration loader for multiple config file formats")
  5253. (description
  5254. "Plaster is a loader interface around multiple config file formats. It
  5255. exists to define a common API for applications to use when they wish to load
  5256. configuration. The library itself does not aim to handle anything except a
  5257. basic API that applications may use to find and load configuration settings.
  5258. Any specific constraints should be implemented in a pluggable loader which can
  5259. be registered via an entrypoint.")
  5260. (license license:repoze)))
  5261. (define-public python-plaster-pastedeploy
  5262. (package
  5263. (name "python-plaster-pastedeploy")
  5264. (version "0.7")
  5265. (source (origin
  5266. (method url-fetch)
  5267. (uri (pypi-uri "plaster_pastedeploy" version))
  5268. (sha256
  5269. (base32
  5270. "1zg7gcsvc1kzay1ry5p699rg2qavfsxqwl17mqxzr0gzw6j9679r"))))
  5271. (build-system python-build-system)
  5272. (native-inputs
  5273. (list python-pytest))
  5274. (propagated-inputs
  5275. (list python-plaster python-pastedeploy))
  5276. (home-page "https://github.com/Pylons/plaster_pastedeploy")
  5277. (synopsis "Plugin for python-plaster adding PasteDeploy syntax")
  5278. (description
  5279. "This plugin for @code{python-plaster} adds support for PasteDeploy
  5280. syntax, it provides a plaster @code{Loader} object that can parse ini files
  5281. according to the standard set by PasteDeploy")
  5282. (license license:expat)))
  5283. (define-public python-hupper
  5284. (package
  5285. (name "python-hupper")
  5286. (version "1.10.3")
  5287. (source (origin
  5288. (method url-fetch)
  5289. (uri (pypi-uri "hupper" version))
  5290. (sha256
  5291. (base32
  5292. "1nbc648d110jx6ziji980cdmzsd14p8fqrcarsdvr1vm5jvm2vyd"))))
  5293. (build-system python-build-system)
  5294. (arguments '(#:test-target "pytest"))
  5295. (native-inputs
  5296. (list python-pytest python-pytest-runner python-watchdog python-mock
  5297. python-pytest-cov))
  5298. (propagated-inputs
  5299. (list python-pytz))
  5300. (home-page "https://readthedocs.org/projects/hupper")
  5301. (synopsis "Integrated process monitor tracking changes to imported Python files")
  5302. (description
  5303. "Hupper is an integrated process monitor that will track changes to any
  5304. imported Python files in sys.modules as well as custom paths. When files are
  5305. changed the process is restarted.")
  5306. (license license:expat)))
  5307. (define-public python-pyowm
  5308. (package
  5309. (name "python-pyowm")
  5310. (version "3.2.0")
  5311. (source
  5312. (origin
  5313. (method url-fetch)
  5314. (uri (pypi-uri "pyowm" version))
  5315. (sha256
  5316. (base32 "1pm8w6phr4m3xayndfndid366vhf1fpvdgjsp2zicxarmgc0pm53"))))
  5317. (build-system python-build-system)
  5318. (propagated-inputs (list python-geojson python-pysocks python-requests))
  5319. (home-page "https://github.com/csparpa/pyowm")
  5320. (synopsis "Python wrapper around OpenWeatherMap web APIs")
  5321. (description
  5322. "This package provides a Python wrapper around OpenWeatherMap web APIs.")
  5323. (license license:expat)))
  5324. (define-public python-pyramid
  5325. (package
  5326. (name "python-pyramid")
  5327. (version "1.10.4")
  5328. (source (origin
  5329. (method url-fetch)
  5330. (uri (pypi-uri "pyramid" version))
  5331. (sha256
  5332. (base32
  5333. "0rkxs1ajycg2zh1c94xlmls56mx5m161sn8112skj0amza6cn36q"))))
  5334. (build-system python-build-system)
  5335. (propagated-inputs
  5336. (list python-hupper
  5337. python-plaster-pastedeploy
  5338. python-translationstring
  5339. python-venusian
  5340. python-webob
  5341. python-zope-deprecation
  5342. python-zope-interface
  5343. python-webtest
  5344. python-zope-component
  5345. python-plaster))
  5346. (home-page "https://trypyramid.com/")
  5347. (synopsis "Python web-framework suitable for small and large sites")
  5348. (description
  5349. "Pyramid makes it easy to write web applications. From minimal
  5350. request/response web apps to larger, grown applications.")
  5351. (license license:repoze)))
  5352. (define-public python-random-user-agent
  5353. (package
  5354. (name "python-random-user-agent")
  5355. (version "1.0.1")
  5356. (source
  5357. (origin
  5358. (method url-fetch)
  5359. (uri (pypi-uri "random_user_agent" version))
  5360. (sha256
  5361. (base32
  5362. "04nhzdh2ki7ybhjrmghxci6hcm6i03vvin2q2ynj87fbr1pa534g"))))
  5363. (build-system python-build-system)
  5364. (home-page "https://github.com/Luqman-Ud-Din/random_user_agent")
  5365. (synopsis "List of user agents")
  5366. (description
  5367. "This package provides a list of user agents, from a collection of more
  5368. than 326,000 known user-agents. Users can pick a random one, or select one
  5369. based on filters.")
  5370. (license license:expat)))
  5371. (define-public python-flask-restx
  5372. (package
  5373. (name "python-flask-restx")
  5374. (version "0.5.1")
  5375. (source
  5376. ;; We fetch from the Git repo because there are no tests in the PyPI
  5377. ;; archive.
  5378. (origin
  5379. (method git-fetch)
  5380. (uri (git-reference
  5381. (url "https://github.com/python-restx/flask-restx")
  5382. (commit version)))
  5383. (file-name (git-file-name name version))
  5384. (sha256
  5385. (base32 "18vrmknyxw6adn62pz3kr9kvazfgjgl4pgimdf8527fyyiwcqy15"))))
  5386. (build-system python-build-system)
  5387. (propagated-inputs
  5388. (list python-aniso8601 python-flask python-jsonschema python-pytz))
  5389. (native-inputs
  5390. (list python-blinker
  5391. python-faker
  5392. python-pytest
  5393. python-pytest-benchmark
  5394. python-pytest-flask
  5395. python-pytest-mock))
  5396. (arguments
  5397. `(#:phases
  5398. (modify-phases %standard-phases
  5399. (replace 'check
  5400. (lambda _
  5401. (invoke "pytest" "--benchmark-skip" "-k"
  5402. ;; Those tests need internet access
  5403. "not test_check and not test_valid_value_check \
  5404. and not test_override_app_level"))))))
  5405. (home-page "https://github.com/python-restx/flask-restx")
  5406. (synopsis
  5407. "Framework for fast, easy and documented API development with Flask")
  5408. (description
  5409. "Flask-RESTX is an extension for Flask that adds support for quickly building
  5410. REST APIs. Flask-RESTX encourages best practices with minimal setup. If you are familiar
  5411. with Flask, Flask-RESTX should be easy to pick up. It provides a coherent collection of
  5412. decorators and tools to describe your API and expose its documentation properly using
  5413. Swagger.")
  5414. (license license:bsd-3)))
  5415. (define-public python-flask-restplus
  5416. (deprecated-package "python-flask-restplus" python-flask-restx))
  5417. (define-public python-flask-socketio
  5418. (package
  5419. (name "python-flask-socketio")
  5420. (version "5.0.1")
  5421. (source
  5422. (origin
  5423. (method url-fetch)
  5424. (uri (pypi-uri "Flask-SocketIO" version))
  5425. (sha256
  5426. (base32
  5427. "09r2gpj2nbn72v2zaf6xsvlazln77pgqzp2pg2021nja47sijhsw"))))
  5428. (build-system python-build-system)
  5429. (propagated-inputs
  5430. (list python-flask python-socketio))
  5431. (arguments '(#:tests? #f)) ; Tests not included in release tarball.
  5432. (home-page "https://github.com/miguelgrinberg/Flask-SocketIO/")
  5433. (synopsis "Socket.IO integration for Flask applications")
  5434. (description "Socket.IO integration for Flask applications")
  5435. (license license:expat)))
  5436. (define-public python-manuel
  5437. (package
  5438. (name "python-manuel")
  5439. (version "1.10.1")
  5440. (source
  5441. (origin
  5442. (method url-fetch)
  5443. (uri (pypi-uri "manuel" version))
  5444. (sha256
  5445. (base32
  5446. "1bdzay7j70fly5fy6wbdi8fbrxjrrlxnxnw226rwry1c8a351rpy"))))
  5447. (build-system python-build-system)
  5448. (propagated-inputs
  5449. (list python-six))
  5450. (native-inputs
  5451. (list python-zope-testing))
  5452. (home-page "https://pypi.org/project/manuel/")
  5453. (synopsis "Build tested documentation")
  5454. (description
  5455. "Manuel lets you mix and match traditional doctests with custom test syntax.")
  5456. (license license:asl2.0)))
  5457. (define-public python-persistent
  5458. (package
  5459. (name "python-persistent")
  5460. (version "4.6.4")
  5461. (source
  5462. (origin
  5463. (method url-fetch)
  5464. (uri (pypi-uri "persistent" version))
  5465. (sha256
  5466. (base32
  5467. "0imm9ji03lhkpcfmhid7x5209ix8g2rlgki9ik1qxks4b8sm8gzq"))))
  5468. (build-system python-build-system)
  5469. (propagated-inputs
  5470. (list python-cffi python-zope-interface))
  5471. (native-inputs
  5472. (list python-manuel python-zope-testrunner))
  5473. (home-page "https://github.com/zopefoundation/persistent/")
  5474. (synopsis "Translucent persistent objects")
  5475. (description "This package contains a generic persistence implementation for
  5476. Python. It forms the core protocol for making objects interact
  5477. \"transparently\" with a database such as the ZODB.")
  5478. (license license:zpl2.1)))
  5479. (define-public python-btrees
  5480. (package
  5481. (name "python-btrees")
  5482. (version "4.7.2")
  5483. (source
  5484. (origin
  5485. (method url-fetch)
  5486. (uri (pypi-uri "BTrees" version))
  5487. (sha256
  5488. (base32
  5489. "0iiq0g9k1g6qgqq84q9h6639vlvzznk1rgdm0rfcnnqkbkmsbr3w"))))
  5490. (build-system python-build-system)
  5491. (propagated-inputs
  5492. (list python-persistent python-zope-interface))
  5493. (native-inputs
  5494. (list python-persistent python-transaction python-zope-testrunner))
  5495. (home-page "https://github.com/zopefoundation/BTrees")
  5496. (synopsis "Scalable persistent object containers")
  5497. (description
  5498. "This package contains a set of persistent object containers built around a
  5499. modified BTree data structure. The trees are optimized for use inside ZODB's
  5500. \"optimistic concurrency\" paradigm, and include explicit resolution of
  5501. conflicts detected by that mechanism.")
  5502. (license license:zpl2.1)))
  5503. (define-public python-transaction
  5504. (package
  5505. (name "python-transaction")
  5506. (version "3.0.0")
  5507. (source
  5508. (origin
  5509. (method url-fetch)
  5510. (uri (pypi-uri "transaction" version))
  5511. (sha256
  5512. (base32
  5513. "0bdaks31bgfh78wnj3sij24bfysmqk25crsis6amz8kzrc0d82iv"))))
  5514. (build-system python-build-system)
  5515. (propagated-inputs
  5516. (list python-zope-interface))
  5517. (native-inputs
  5518. (list python-coverage python-mock python-nose))
  5519. (home-page "https://github.com/zopefoundation/transaction")
  5520. (synopsis "Transaction management for Python")
  5521. (description "This package contains a generic transaction implementation
  5522. for Python. It is mainly used by the ZODB.")
  5523. (license license:zpl2.1)))
  5524. (define-public python-robot-detection
  5525. (package
  5526. (name "python-robot-detection")
  5527. (version "0.4")
  5528. (source
  5529. (origin
  5530. (method url-fetch)
  5531. (uri (pypi-uri "robot-detection" version))
  5532. (sha256
  5533. (base32
  5534. "1xd2jm3yn31bnk1kqzggils2rxj26ylxsfz3ap7bhr3ilhnbg3rx"))))
  5535. (build-system python-build-system)
  5536. (arguments '(#:tests? #f)) ; Tests not shipped in pypi release.
  5537. (propagated-inputs (list python-six))
  5538. (home-page "https://github.com/rory/robot-detection")
  5539. (synopsis "Detect web crawlers")
  5540. (description
  5541. "@code{robot_detection} is a python module to detect if a given HTTP User
  5542. Agent is a web crawler. It uses the list of registered robots from
  5543. @url{http://www.robotstxt.org}.")
  5544. (license license:gpl3+)))
  5545. (define-public python-pysolr
  5546. (package
  5547. (name "python-pysolr")
  5548. (version "3.9.0")
  5549. (source
  5550. (origin
  5551. (method url-fetch)
  5552. (uri (pypi-uri "pysolr" version))
  5553. (sha256
  5554. (base32
  5555. "1rj5jmscvxjwcmlfi6hmkj44l4x6n3ln5p7d8d18j566hzmmzw3f"))))
  5556. (build-system python-build-system)
  5557. (arguments
  5558. '(#:tests? #f)) ; Tests require network access.
  5559. (propagated-inputs
  5560. (list python-requests))
  5561. (native-inputs
  5562. (list python-setuptools-scm))
  5563. (home-page "https://github.com/django-haystack/pysolr/")
  5564. (synopsis "Lightweight python wrapper for Apache Solr")
  5565. (description
  5566. "This module provides an interface that queries the Apache Solr server
  5567. using a pure Python implementation.")
  5568. (license license:bsd-3)))
  5569. (define-public python-pyjsparser
  5570. (package
  5571. (name "python-pyjsparser")
  5572. (version "2.7.1")
  5573. (source
  5574. (origin
  5575. (method url-fetch)
  5576. (uri (pypi-uri "pyjsparser" version))
  5577. (sha256
  5578. (base32 "0ycmf9fsvwliqmm1n6sfz7x71y7i2kbfgn39d8lsbiccfxmxlq5y"))))
  5579. (build-system python-build-system)
  5580. (home-page "https://github.com/PiotrDabkowski/pyjsparser")
  5581. (synopsis "Fast JavaScript parser")
  5582. (description "This package provides a fast JavaScript parser (based on
  5583. esprima.js)")
  5584. (license license:expat)))
  5585. (define-public python-js2py
  5586. (package
  5587. (name "python-js2py")
  5588. (version "0.71")
  5589. (source
  5590. (origin
  5591. (method url-fetch)
  5592. (uri (pypi-uri "Js2Py" version))
  5593. (sha256
  5594. (base32 "1kkzkys6dfcbdv51vqxr9cmak350ab4mmykb8dysx60lvl4i06x4"))))
  5595. (build-system python-build-system)
  5596. (arguments '(#:tests? #false)) ; none included
  5597. (propagated-inputs
  5598. (list python-pyjsparser python-six python-tzlocal))
  5599. (home-page "https://github.com/PiotrDabkowski/Js2Py")
  5600. (synopsis "JavaScript to Python translator")
  5601. (description
  5602. "This package provides a JavaScript to Python translator and a JavaScript
  5603. interpreter written in pure Python.")
  5604. (license license:expat)))
  5605. (define-public python-http-ece
  5606. (package
  5607. (name "python-http-ece")
  5608. (version "1.1.0")
  5609. (source
  5610. (origin
  5611. (method git-fetch)
  5612. (uri (git-reference
  5613. (url "https://github.com/web-push-libs/encrypted-content-encoding")
  5614. (commit (string-append "v" version))))
  5615. (file-name (git-file-name name version))
  5616. (sha256
  5617. (base32
  5618. "0bp4cc0xc123i72h80ax3qz3ixfwx3j7pw343kc7i6kdvfi8klx7"))))
  5619. (build-system python-build-system)
  5620. (arguments
  5621. `(#:phases
  5622. (modify-phases %standard-phases
  5623. (add-after 'unpack 'change-directory
  5624. (lambda _ (chdir "python") #t)))))
  5625. (propagated-inputs
  5626. (list python-cryptography))
  5627. (native-inputs
  5628. (list python-coverage python-flake8 python-mock python-nose))
  5629. (home-page "https://github.com/web-push-libs/encrypted-content-encoding")
  5630. (synopsis "Encrypted Content Encoding for HTTP")
  5631. (description
  5632. "This package provices a simple implementation of Encrypted Content
  5633. Encoding for HTTP.")
  5634. (license license:expat)))
  5635. (define-public python-cloudscraper
  5636. (package
  5637. (name "python-cloudscraper")
  5638. (version "1.2.58")
  5639. (source
  5640. (origin
  5641. (method git-fetch)
  5642. (uri (git-reference
  5643. (url "https://github.com/VeNoMouS/cloudscraper")
  5644. ;; Corresponds to 1.2.58
  5645. (commit "f3a3d067ea8b5238e9a0948aed0c3fa0d9c29b96")))
  5646. (file-name (git-file-name name version))
  5647. (sha256
  5648. (base32 "18fbp086imabjxly04rrchbf6n6m05bpd150zxbw7z2w3mjnpsqd"))
  5649. (modules '((guix build utils)))
  5650. (snippet
  5651. '(with-directory-excursion "cloudscraper"
  5652. (for-each delete-file
  5653. '("captcha/9kw.py"
  5654. "captcha/anticaptcha.py"))
  5655. (substitute* "__init__.py"
  5656. ;; Perhaps it's a joke, but don't promote proprietary software.
  5657. (("([Th]is feature is not available) in the .*'" _ prefix)
  5658. (string-append prefix ".'")))))))
  5659. (build-system python-build-system)
  5660. (arguments
  5661. `(#:phases
  5662. (modify-phases %standard-phases
  5663. ;; XXX: Dependencies, that have not yet been packaged
  5664. ;; and cause an import error when included.
  5665. (add-after 'unpack 'drop-unsupported-sources
  5666. (lambda _
  5667. (with-directory-excursion "cloudscraper"
  5668. (for-each delete-file
  5669. '("interpreters/v8.py")))))
  5670. (add-after 'unpack 'fix-references
  5671. (lambda _
  5672. (substitute* "cloudscraper/interpreters/nodejs.py"
  5673. (("'node'")
  5674. (string-append "'" (which "node") "'")))))
  5675. (replace 'check
  5676. (lambda* (#:key tests? #:allow-other-keys)
  5677. (when tests?
  5678. (invoke "pytest" "-vv"
  5679. "-k" "not test_getCookieString_challenge_js_challenge1_16_05_2020")))))))
  5680. (inputs
  5681. (list node))
  5682. (propagated-inputs
  5683. (list python-js2py
  5684. python-polling2
  5685. python-requests
  5686. python-requests-toolbelt
  5687. python-responses
  5688. python-pyparsing-2.4.7))
  5689. (native-inputs
  5690. (list python-pytest))
  5691. (home-page "https://github.com/venomous/cloudscraper")
  5692. (synopsis "Cloudflare anti-bot bypass")
  5693. (description
  5694. "This module acts as a webbrowser solving Cloudflare's Javascript
  5695. challenges.")
  5696. (license license:expat)))
  5697. (define-public python-imap-tools
  5698. (package
  5699. (name "python-imap-tools")
  5700. (version "0.29.0")
  5701. (source
  5702. (origin
  5703. (method url-fetch)
  5704. (uri (pypi-uri "imap_tools" version))
  5705. (sha256
  5706. (base32
  5707. "0x122jwpc74wwyw2rsv2fvh6p12y31019ndfr9717jzjkj2d3lhb"))))
  5708. (build-system python-build-system)
  5709. (arguments '(#:tests? #f)) ; tests require internet access
  5710. (home-page "https://github.com/ikvk/imap_tools")
  5711. (synopsis "Work with email and mailbox by IMAP")
  5712. (description
  5713. "This Python library provides tools to deal with email and mailboxes
  5714. over IMAP:
  5715. @itemize
  5716. @item Parsed email message attributes
  5717. @item Query builder for searching emails
  5718. @item Work with emails in folders (copy, delete, flag, move, seen)
  5719. @item Work with mailbox folders (list, set, get, create, exists, rename, delete, status)
  5720. @end itemize")
  5721. (license license:asl2.0)))
  5722. (define-public python-giturlparse
  5723. (package
  5724. (name "python-giturlparse")
  5725. (version "0.10.0")
  5726. (source
  5727. (origin
  5728. (method url-fetch)
  5729. (uri (pypi-uri "giturlparse" version))
  5730. (sha256
  5731. (base32 "0dxk7sqy8ibaqdl6jzxd0ac1p7shzp4p9f3lhkd7qw9h3llsp595"))))
  5732. (build-system python-build-system)
  5733. (home-page "https://github.com/nephila/giturlparse")
  5734. (synopsis "Git URL parsing module")
  5735. (description "This package provides a git URL parsing module which supports
  5736. parsing and rewriting of remote git URLs from various hosting providers.")
  5737. (license license:asl2.0)))
  5738. (define-public python-hstspreload
  5739. (package
  5740. (name "python-hstspreload")
  5741. (version "2020.10.20")
  5742. (source
  5743. (origin
  5744. (method url-fetch)
  5745. (uri (pypi-uri "hstspreload" version))
  5746. (sha256
  5747. (base32
  5748. "1qah80p2xlib1rhivvdj9v5y3girxrj7dwp1mnh8mwaj5wy32y8a"))))
  5749. (build-system python-build-system)
  5750. (home-page
  5751. "https://github.com/sethmlarson/hstspreload")
  5752. (synopsis
  5753. "Chromium HSTS Preload list as a Python package")
  5754. (description
  5755. "@code{python-hstspreload} contains Chromium HSTS Preload list
  5756. as a Python package.")
  5757. (license license:bsd-3)))
  5758. (define-public python-sanic
  5759. (package
  5760. (name "python-sanic")
  5761. (version "20.12.4")
  5762. (source
  5763. (origin
  5764. (method url-fetch)
  5765. (uri (pypi-uri "sanic" version))
  5766. (sha256
  5767. (base32
  5768. "0axfc151s7nrykzypzciyvkxxrs5ayx8kxv4r620hjb9w3jjhfnp"))))
  5769. (build-system python-build-system)
  5770. (arguments
  5771. '(#:phases
  5772. (modify-phases %standard-phases
  5773. (add-after 'unpack 'use-recent-pytest
  5774. ;; Allow using recent dependencies.
  5775. (lambda* (#:key inputs #:allow-other-keys)
  5776. (substitute* "setup.py"
  5777. (("pytest==5.2.1") "pytest")
  5778. (("multidict>=5.0,<6.0") "multidict")
  5779. (("httpx==0\\.15\\.4") "httpx"))
  5780. #t))
  5781. (replace 'check
  5782. (lambda* (#:key inputs outputs #:allow-other-keys)
  5783. (add-installed-pythonpath inputs outputs)
  5784. (invoke "pytest" "-vv" "./tests" "-k"
  5785. (string-append "not test_zero_downtime "
  5786. "and not test_gunicorn_worker "
  5787. "and not test_logo_")))))))
  5788. (propagated-inputs
  5789. (list python-aiofiles
  5790. python-httptools
  5791. python-httpx
  5792. python-multidict
  5793. python-ujson
  5794. python-uvloop
  5795. python-websockets))
  5796. (native-inputs
  5797. (list gunicorn
  5798. python-beautifulsoup4
  5799. python-hstspreload
  5800. python-httpcore
  5801. python-pytest
  5802. python-pytest-cov
  5803. python-pytest-benchmark
  5804. python-pytest-sanic
  5805. python-pytest-sugar
  5806. python-pytest-asyncio
  5807. python-urllib3
  5808. python-uvicorn))
  5809. (home-page
  5810. "https://github.com/sanic-org/sanic/")
  5811. (synopsis
  5812. "Async Python web server/framework")
  5813. (description
  5814. "Sanic is a Python web server and web framework
  5815. that's written to go fast. It allows the usage of the
  5816. @code{async/await} syntax added in Python 3.5, which makes
  5817. your code non-blocking and speedy.")
  5818. (license license:expat)))
  5819. (define-public python-socketio
  5820. (package
  5821. (name "python-socketio")
  5822. (version "5.1.0")
  5823. (source
  5824. (origin
  5825. (method url-fetch)
  5826. (uri (pypi-uri "python-socketio" version))
  5827. (sha256
  5828. (base32
  5829. "14vhpxdn54lz54mhcqlgcks0ssbws9gd1y7ii16a2g3gpfdc531k"))))
  5830. (build-system python-build-system)
  5831. (propagated-inputs
  5832. (list python-aiohttp
  5833. python-bidict
  5834. python-engineio
  5835. python-requests
  5836. python-websocket-client
  5837. python-websockets))
  5838. (arguments '(#:tests? #f)) ; Tests not included in release tarball.
  5839. (home-page "https://github.com/miguelgrinberg/python-socketio/")
  5840. (synopsis "Python Socket.IO server")
  5841. (description
  5842. "Python implementation of the Socket.IO realtime client and server.")
  5843. (license license:expat)))
  5844. (define-public python-socks
  5845. (package
  5846. (name "python-socks")
  5847. (version "1.2.4")
  5848. (source
  5849. (origin
  5850. (method url-fetch)
  5851. (uri (pypi-uri "python-socks" version))
  5852. (sha256
  5853. (base32
  5854. "1n6xb18jy41ybgkmamakg6psp3qididd45qknxiggngaiibz43kx"))))
  5855. (build-system python-build-system)
  5856. (arguments
  5857. `(#:tests? #f ; tests not included
  5858. #:phases
  5859. (modify-phases %standard-phases
  5860. (replace 'check
  5861. (lambda* (#:key tests? #:allow-other-keys)
  5862. (when tests?
  5863. (invoke "pytest" "tests/" "-s"))
  5864. #t)))))
  5865. (propagated-inputs
  5866. (list python-async-timeout python-curio python-trio))
  5867. (native-inputs
  5868. (list python-pytest))
  5869. (home-page "https://github.com/romis2012/python-socks")
  5870. (synopsis
  5871. "Core proxy (SOCKS4, SOCKS5, HTTP tunneling) functionality for Python")
  5872. (description
  5873. "Socks is a library providing core proxy (SOCKS4, SOCKS5, HTTP tunneling)
  5874. functionality.")
  5875. (license license:asl2.0)))
  5876. (define-public python-azure-nspkg
  5877. (package
  5878. (name "python-azure-nspkg")
  5879. (version "3.0.2")
  5880. (source
  5881. (origin
  5882. (method url-fetch)
  5883. (uri (pypi-uri "azure-nspkg" version ".zip"))
  5884. (sha256
  5885. (base32
  5886. "1l4xwdh0fcnvrv0mzig4g2kgqkfbsy64zjm1ggc6grk3mykcxlz7"))))
  5887. (build-system python-build-system)
  5888. (native-inputs (list unzip))
  5889. (home-page "https://github.com/Azure/azure-sdk-for-python")
  5890. (synopsis "Azure namespace internals")
  5891. (description
  5892. "This package is an internal Azure namespace package.")
  5893. (license license:expat)))
  5894. (define-public python-azure-storage-nspkg
  5895. (package
  5896. (name "python-azure-storage-nspkg")
  5897. (version "3.1.0")
  5898. (source
  5899. (origin
  5900. (method url-fetch)
  5901. (uri (pypi-uri "azure-storage-nspkg" version))
  5902. (sha256
  5903. (base32
  5904. "049qcmgshz7dj9yaqma0fwcgbxwddgwyfcw4gmv45xfmaa3bwfvg"))))
  5905. (build-system python-build-system)
  5906. (propagated-inputs
  5907. (list python-azure-nspkg))
  5908. (home-page "https://github.com/Azure/azure-storage-python")
  5909. (synopsis "Microsoft Azure Storage Namespace package")
  5910. (description
  5911. "This project provides a client library in Python that makes it easy to
  5912. communicate with Microsoft Azure Storage services.")
  5913. (license license:expat)))
  5914. (define-public python-w3lib
  5915. (package
  5916. (name "python-w3lib")
  5917. (version "1.22.0")
  5918. (source
  5919. (origin
  5920. (method url-fetch)
  5921. (uri (pypi-uri "w3lib" version))
  5922. (sha256
  5923. (base32
  5924. "1pv02lvvmgz2qb61vz1jkjc04fgm4hpfvaj5zm4i3mjp64hd1mha"))))
  5925. (build-system python-build-system)
  5926. (native-inputs
  5927. (list python-six))
  5928. (home-page "https://github.com/scrapy/w3lib")
  5929. (synopsis "Python library of web-related functions")
  5930. (description
  5931. "This is a Python library of web-related functions, such as: remove
  5932. comments, or tags from HTML snippets, extract base url from HTML snippets,
  5933. translate entities on HTML strings, among other things.")
  5934. (license license:bsd-3)))
  5935. (define-public python-webcolors
  5936. (package
  5937. (name "python-webcolors")
  5938. (version "1.11.1")
  5939. (source
  5940. (origin
  5941. (method url-fetch)
  5942. (uri (pypi-uri "webcolors" version))
  5943. (sha256
  5944. (base32 "1rkda75h2p65zx6r84c9mjavn4xpviqvqrklvdvcklapd5in1wvn"))))
  5945. (build-system python-build-system)
  5946. (arguments
  5947. `(#:phases
  5948. (modify-phases %standard-phases
  5949. (replace 'check
  5950. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  5951. (when tests?
  5952. (add-installed-pythonpath inputs outputs)
  5953. (invoke "pytest")))))))
  5954. (native-inputs
  5955. (list python-pytest))
  5956. (home-page "https://github.com/ubernostrum/webcolors")
  5957. (synopsis "HTML/CSS color definitions library")
  5958. (description "@code{python-webcolors} is a module for working with
  5959. HTML/CSS color definitions. Normalizing and converting between the following
  5960. formats is supported.
  5961. @itemize
  5962. @item Specification-defined color names
  5963. @item Six-digit hexadecimal
  5964. @item Three-digit hexadecimal
  5965. @item Integer rgb() triplet
  5966. @item Percentage rgb() triplet
  5967. @end itemize
  5968. Only the RGB colorspace is supported. Conversion to/from the HSL colorspace
  5969. can be handled by the @code{colorsys} module in the Python standard library.")
  5970. (license license:bsd-3)))
  5971. (define-public python-woob
  5972. (package
  5973. (name "python-woob")
  5974. (version "3.0")
  5975. (source
  5976. (origin
  5977. (method url-fetch)
  5978. (uri (pypi-uri "woob" version))
  5979. (sha256
  5980. (base32 "09hpxy5zhn2b8li0xjf3zd7s46lawb0315p5mdcsci3bj3s4v1j7"))))
  5981. (build-system python-build-system)
  5982. ;; A small number of tests for optional applications fails due to missing
  5983. ;; inputs.
  5984. (arguments `(#:tests? #f))
  5985. (propagated-inputs
  5986. (list python-babel
  5987. python-colorama
  5988. python-cssselect
  5989. python-dateutil
  5990. python-feedparser
  5991. python-html2text
  5992. python-lxml
  5993. python-pillow
  5994. python-prettytable
  5995. python-pyqt
  5996. python-pyyaml
  5997. python-requests
  5998. python-six
  5999. python-unidecode))
  6000. (native-inputs
  6001. (list python-coverage python-flake8 python-nose python-selenium
  6002. python-xunitparser))
  6003. (home-page "https://woob.tech/")
  6004. (synopsis "Woob, Web Outside Of Browsers")
  6005. (description "Woob is a collection of applications able to interact with
  6006. websites, without requiring the user to open them in a browser. It also
  6007. provides well-defined APIs to talk to websites lacking one.")
  6008. (license license:lgpl3+)))
  6009. (define-public python-flask-combo-jsonapi
  6010. (package
  6011. (name "python-flask-combo-jsonapi")
  6012. (version "1.1.0")
  6013. (source
  6014. (origin
  6015. (method git-fetch)
  6016. (uri (git-reference
  6017. (url "https://github.com/AdCombo/flask-combo-jsonapi")
  6018. (commit version)))
  6019. (file-name (git-file-name name version))
  6020. (sha256
  6021. (base32 "07fhcjiyif80z1vyh35za29sqx1mmqh568jrbrrs675j4a797sj1"))))
  6022. (build-system python-build-system)
  6023. (arguments
  6024. '(#:phases (modify-phases %standard-phases
  6025. (add-after 'unpack 'loosen-requirements
  6026. (lambda _
  6027. ;; Don't pin specific versions of dependencies.
  6028. (substitute* "requirements.txt"
  6029. (("^sqlalchemy[=<>].*") "sqlalchemy\n")
  6030. (("^marshmallow[=<>].*") "marshmallow\n")
  6031. (("^Flask[=<>].*") "Flask\n"))))
  6032. (replace 'check
  6033. (lambda _
  6034. (invoke "pytest" "-vv"))))))
  6035. (propagated-inputs
  6036. (list python-flask
  6037. python-marshmallow
  6038. python-marshmallow-jsonapi
  6039. python-simplejson
  6040. python-sqlalchemy
  6041. python-apispec
  6042. python-simplejson
  6043. python-six))
  6044. (native-inputs
  6045. (list python-coverage python-coveralls python-pytest
  6046. python-pytest-runner))
  6047. (home-page "https://github.com/AdCombo/flask-combo-jsonapi")
  6048. (synopsis "Flask extension to quickly create JSON:API 1.0 REST Web APIs")
  6049. (description
  6050. "Flask-COMBO-JSONAPI is a Python Flask extension for building REST Web APIs
  6051. compliant with the @uref{https://jsonapi.org, JSON:API 1.0} specification.
  6052. It tries to combine the power of Flask-Restless with the flexibility of
  6053. Flask-RESTful to quickly build APIs that fit the complexity of existing
  6054. real-life projects with legacy data and diverse storage providers.")
  6055. (license license:expat)))
  6056. (define-public python-mwparserfromhell
  6057. (package
  6058. (name "python-mwparserfromhell")
  6059. (version "0.6.3")
  6060. (source
  6061. (origin
  6062. (method url-fetch)
  6063. (uri (pypi-uri "mwparserfromhell" version))
  6064. (sha256
  6065. (base32 "0zh9zaqbac18s7mivqk8am9xw97lfkgcj9hhxj0d4208pkqpkmqs"))))
  6066. (build-system python-build-system)
  6067. (native-inputs
  6068. (list python-pytest python-pytest-runner))
  6069. (home-page "https://github.com/earwig/mwparserfromhell")
  6070. (synopsis "Python parser for MediaWiki wikicode")
  6071. (description
  6072. "The MediaWiki Parser From Hell is a python library package that provides
  6073. a parser for MediaWiki.
  6074. It exposes parses as normal string objects with additional methods giving
  6075. access to the special Wikicode features it contains (hyperlinks, tags,
  6076. templates…). The parser doesn't interpolate strings at all, it remains at a
  6077. purely formal level.
  6078. Full documentation may be found at
  6079. @uref{https://mwparserfromhell.readthedocs.io, ReadTheDocs}")
  6080. (license license:expat)))
  6081. (define-public python-tweepy
  6082. (package
  6083. (name "python-tweepy")
  6084. (version "4.4.0")
  6085. (source
  6086. (origin
  6087. (method git-fetch)
  6088. (uri
  6089. (git-reference
  6090. (url "https://github.com/tweepy/tweepy")
  6091. (commit (string-append "v" version))))
  6092. (file-name (git-file-name name version))
  6093. (sha256
  6094. (base32
  6095. "0jl3j20iqvzqqw5q5ldval5wrc2pdx94zff3b6b87j51yjx3qjhr"))))
  6096. (build-system python-build-system)
  6097. (arguments
  6098. `(#:phases
  6099. (modify-phases %standard-phases
  6100. (replace 'check
  6101. (lambda* (#:key tests? #:allow-other-keys)
  6102. (when tests?
  6103. (invoke "python" "-m" "unittest" "discover" "tests")))))))
  6104. (propagated-inputs
  6105. (list python-aiohttp python-requests python-requests-oauthlib))
  6106. (native-inputs
  6107. (list python-vcrpy))
  6108. (home-page "https://www.tweepy.org/")
  6109. (synopsis "Twitter library for Python")
  6110. (description "This package provides @code{Tweepy}, an easy-to-use Python
  6111. library for accessing the Twitter API.")
  6112. (license license:expat)))