-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.toml
1548 lines (1506 loc) · 520 KB
/
index.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
mtime = 1594491762
[[pkgs]]
type = "github"
distrib = "pywharf"
package = "pywharf-0.2.3-py3-none-any"
ext = "whl"
sha256 = "13e225746919015b591f999ea0ea8f5c63e3c35df163c0a5a04c80af88583c2d"
url = "https://api.github.com/repos/pywharf/pywharf-pkg-repo/releases/assets/22790093"
[pkgs.meta]
name = "pywharf"
version = "0.2.3"
filetype = "bdist_wheel"
pyversion = "py3"
metadata_version = "2.1"
summary = "A private PyPI server powered by flexible backends."
home_page = "https://github.com/pywharf/pywharf"
author = "huntzhan"
author_email = "[email protected]"
maintainer = ""
maintainer_email = ""
license = "MIT"
description = "<div align=\"center\">\n\n# pywharf\n\n**The private PyPI server powered by flexible backends.**\n\n[![build-and-push](https://github.com/pywharf/pywharf/workflows/build-and-push/badge.svg)](https://github.com/pywharf/pywharf/actions?query=workflow%3Abuild-and-push)\n[![license](https://img.shields.io/github/license/pywharf/pywharf)](https://github.com/pywharf/pywharf/blob/master/LICENSE)\n\n</div>\n\n* [pywharf](#pywharf)\n\t* [What is it?](#What-is-it?)\n\t* [Design](#Design)\n\t* [Usage](#Usage)\n\t\t* [Install from PyPI](#Install-from-PyPI)\n\t\t* [Using the docker image (recommended)](#Using-the-docker-image-(recommended))\n\t\t* [Run the server](#Run-the-server)\n\t\t* [Server API](#Server-API)\n\t\t* [Update index](#Update-index)\n\t\t* [Backend-specific commands](#Backend-specific-commands)\n\t\t* [Environment mode](#Environment-mode)\n\t* [Backends](#Backends)\n\t\t* [GitHub](#GitHub)\n\t\t* [File system](#File-system)\n\n------\n\n## What is it?\n\n`pywharf` allows you to deploy a PyPI server privately and keep your artifacts safe by leveraging the power (confidentiality, integrity and availability) of your storage backend. The backend mechanism is designed to be flexible so that the developer could support a new storage backend at a low cost.\n\nSupported backends:\n\n- GitHub. (Yes, you can now host your Python package in GitHub by using `pywharf`. )\n- File system.\n- ... (*Upcoming*)\n\n## Design\n\n<div align=\"center\"><img width=\"766\" alt=\"Screen Shot 2020-03-24 at 8 19 12 PM\" src=\"https://user-images.githubusercontent.com/5213906/77424853-c14e0480-6e0c-11ea-9a7f-879a68ada0a0.png\"></div>\n\nThe `pywharf` server serves as an abstraction layer between Python package management tools (pip/poetry/twine) and the storage backends:\n\n* Package management tools communicate with `pywharf` server, following [PEP 503 -- Simple Repository API](https://www.python.org/dev/peps/pep-0503/) for searching/downloading package, and [Legacy API](https://warehouse.pypa.io/api-reference/legacy/#upload-api) for uploading package.\n* `pywharf` server then performs file search/download/upload operations with some specific storage backend.\n\n## Usage\n\n### Install from PyPI\n\n```shell\npip install pywharf==0.2.3\n```\n\nThis should bring the execuable `pywharf` to your environment.\n\n```shell\n$ pywharf --help\nSYNOPSIS\n pywharf <command> <command_flags>\n\nSUPPORTED COMMANDS\n server\n update_index\n github.init_pkg_repo\n github.gen_gh_pages\n```\n\n### Using the docker image (recommended)\n\nDocker image: `pywharf/pywharf:0.2.3`. The image tag is the same as the package version in PyPI.\n\n```shell\n$ docker run --rm pywharf/pywharf:0.2.3 --help\nSYNOPSIS\n pywharf <command> <command_flags>\n\nSUPPORTED COMMANDS\n server\n update_index\n github.init_pkg_repo\n github.gen_gh_pages\n```\n\n### Run the server\n\nTo run the server, use the command `pywharf server`.\n\n```txt\nSYNOPSIS\n pywharf server ROOT <flags>\n\nPOSITIONAL ARGUMENTS\n ROOT (str):\n Path to the root folder. This folder is for logging,\n file-based lock and any other file I/O.\n\nFLAGS\n --config (Optional[str]):\n Path to the package repository config (TOML),\n or the file content if --config_or_admin_secret_can_be_text is set.\n Default to None.\n --admin_secret (Optional[str]):\n Path to the admin secrets config (TOML) with read/write permission.\n or the file content if --config_or_admin_secret_can_be_text is set.\n This field is required for local index synchronization.\n Default to None.\n --config_or_admin_secret_can_be_text (Optional[bool]):\n Enable passing the file content to --config or --admin_secret.\n Default to False.\n --auth_read_expires (int):\n The expiration time (in seconds) for read authentication.\n Default to 3600.\n --auth_write_expires (int):\n The expiration time (in seconds) for write authentication.\n Default to 300.\n --extra_index_url (str):\n Extra index url for redirection in case package not found.\n If set to empty string explicitly redirection will be suppressed.\n Default to 'https://pypi.org/simple/'.\n --debug (bool):\n Enable debug mode.\n Default to False.\n --host (str):\n The interface to bind to.\n Default to '0.0.0.0'.\n --port (int):\n The port to bind to.\n Default to 8888.\n **waitress_options (Dict[str, Any]):\n Optional arguments that `waitress.serve` takes.\n Details in https://docs.pylonsproject.org/projects/waitress/en/stable/arguments.html.\n Default to {}.\n```\n\nIn short, the configuration passed to `--config` defines mappings from `pkg_repo_name` to backend-specific settings. In other words, a single server instance can be configured to connect to multiple backends.\n\nExampe of the configuration file passed to `--config`:\n\n```toml\n[pywharf-pkg-repo]\ntype = \"github\"\nowner = \"pywharf\"\nrepo = \"pywharf-pkg-repo\"\n\n[local-file-system]\ntype = \"file_system\"\nread_secret = \"foo\"\nwrite_secret = \"bar\"\n```\n\nExampe of the admin secret file passed to `--admin_secret`:\n\n```toml\n[pywharf-pkg-repo]\ntype = \"github\"\nraw = \"<personal-access-token>\"\n\n[local-file-system]\ntype = \"file_system\"\nraw = \"foo\"\n```\n\nExample run:\n\n```shell\ndocker run --rm \\\n -v /path/to/root:/pywharf-root \\\n -v /path/to/config.toml:/config.toml \\\n -v /path/to/admin_secret.toml:/admin_secret.toml \\\n -p 8888:8888 \\\n pywharf/pywharf:0.2.3 \\\n server \\\n /pywharf-root \\\n --config=/config.toml \\\n --admin_secret=/admin_secret.toml\n```\n\n### Server API\n\n#### Authentication in shell\n\nUser must provide the `pkg_repo_name` and their secret in most of the API calls so that the server can find which backend to operate and determine whether the operation is permitted or not. The `pkg_repo_name` and the secret should be provided in [basic access authentication](https://en.wikipedia.org/wiki/Basic_access_authentication).\n\nSome package management tools will handle the authentication behind the screen, for example,\n\n* Twine: to set the environment variables `TWINE_USERNAME` and `TWINE_PASSWORD`. [ref](https://github.com/pypa/twine#environment-variables)\n* Poetry: [Configuring credentials](https://python-poetry.org/docs/repositories/#configuring-credentials).\n\nSome will not, for example,\n\n* Pip: you need to prepend `<pkg_repo_name>:<secret>@` to the hostname in the URL manually like this `https://[username[:password]@]pypi.company.com/simple`. [ref](https://pip.pypa.io/en/stable/user_guide/#basic-authentication-credentials)\n\n#### Authentication in browser\n\nYou need to visit `/login` page to submit `pkg_repo_name` and the secret, since most of the browsers today don't support prepending `<username>:<password>@` to the hostname in the URL. The `pkg_repo_name` and the secret will be stored in the session cookies. To reset, visit `/logout` .\n\nExample: `http://localhost:8888/login/`\n\n<div align=\"center\"><img width=\"600\" alt=\"Screen Shot 2020-03-25 at 12 36 03 PM\" src=\"https://user-images.githubusercontent.com/5213906/77502233-40871b00-6e95-11ea-8ac9-4844d7067ed2.png\"></div>\n\n\n#### PEP-503, Legacy API\n\nThe server follows [PEP 503 -- Simple Repository API](https://www.python.org/dev/peps/pep-0503/) and [Legacy API](https://warehouse.pypa.io/api-reference/legacy/#upload-api) to define APIs for searching/downloading/uploading package:\n\n* `GET /simple/`: List all distributions.\n* `GET /simple/<distrib>/`: List all packages in a distribution.\n* `GET /simple/<distrib>/<filename>`: Download a package file.\n* `POST /simple/`: Upload a package file.\n\nIn a nutshell, you need to set the \"index url / repository url / ...\" to `http://<host>:<port>/simple/` for the package management tool.\n\n#### Server management\n\n##### `GET /index_mtime`\n\nGet the last index index synchronization timestamp.\n\n```shell\n$ curl http://debug:foo@localhost:8888/index_mtime/\n1584379892\n```\n\n##### `POST /initialize`\n\nSubmit configuration and (re-)initialize the server. User can change the package repository configuration on-the-fly with this API.\n\n```shell\n# POST the file content.\n$ curl \\\n -d \"config=${CONFIG}&admin_secret=${ADMIN_SECRET}\" \\\n -X POST \\\n http://localhost:8888/initialize/\n\n# Or, POST the file.\n$ curl \\\n -F 'config=@/path/to/config.toml' \\\n -F 'admin_secret=@/path/to/admin_secret.toml' \\\n http://localhost:8888/initialize/\n```\n\n### Update index\n\n<div align=\"center\"><img width=\"636\" alt=\"Screen Shot 2020-03-25 at 5 39 19 PM\" src=\"https://user-images.githubusercontent.com/5213906/77522697-9a043f80-6ebf-11ea-95e6-9a086db7af2e.png\"></div>\n\nIndex file is used to track all published packages in a specific time:\n\n* *Remote index file*: the index file sotred in the backend. By design, this file is only updated by a standalone `update index` service and will not be updated by the `pywharf` server.\n* *Local index file*: the index file synchronized from the remote index file by the `pywharf` server\n\nTo update the remote index file, use the command `pywharf update_index`:\n\n```txt\nSYNOPSIS\n pywharf update_index TYPE NAME <flags>\n\nPOSITIONAL ARGUMENTS\n TYPE (str):\n Backend type.\n NAME (str):\n Name of config.\n\nFLAGS\n --secret (Optional[str]):\n The secret with write permission.\n --secret_env (Optional[str]):\n Instead of passing the secret through --secret,\n the secret could be loaded from the environment variable.\n **pkg_repo_configs (Dict[str, Any]):\n Any other backend-specific configs are allowed.\n```\n\nBackend developer could setup an `update index` service by invoking `pywharf update_index` command.\n\n### Backend-specific commands\n\nThe backend registration mechanism will hook up the backend-specific commands to `pywharf`. As illustrated, commands `github.init_pkg_repo` and `github.gen_gh_pages` are registered by `github` backend.\n\n```shell\n$ pywharf --help\nSYNOPSIS\n pywharf <command> <command_flags>\n\nSUPPORTED COMMANDS\n server\n update_index\n github.init_pkg_repo\n github.gen_gh_pages\n```\n\n### Environment mode\n\nIf no argument is passed, `pywharf` will try to load the arguments from the environment variables. This mode would be helpful if passing argument in shell is not possible.\n\nThe format:\n\n- `PYWHARF_COMMAND`: to set `<command>`.\n- `PYWHARF_COMMAND_<FLAG>`: to set the flag of `<command>`.\n\n## Backends\n\n### GitHub\n\n#### Introduction\n\n`pywharf` will help you setup a new GitHub repository to host your package. You package will be published as repository release and secured by personal access token. Take https://github.com/pywharf/pywharf-pkg-repo and https://pywharf.github.io/pywharf-pkg-repo/ as an example.\n\n#### Configuration and secret\n\nPackage repository configuration of GitHub backend:\n\n- `type`: must set to `github`.\n- `owner`: repository owner.\n- `repo`: repository name.\n- `branch` (optional): the branch to store the remote index file. Default to `master`.\n- `index_filename` (optional): the name of remote index file. Default to `index.toml`.\n- `max_file_bytes` (optional): limit the maximum size (in bytes) of package. Default to `2147483647` since *each file included in a release must be under 2 GB*, [as restricted by GitHub](https://help.github.com/en/github/administering-a-repository/about-releases#storage-and-bandwidth-quotas) .\n- `sync_index_interval` (optional): the sleep time interval (in seconds) before taking the next local index file synchronization. Default to `60`.\n\nExample configuration of https://github.com/pywharf/pywharf-pkg-repo:\n\n```toml\n[pywharf-pkg-repo]\ntype = \"github\"\nowner = \"pywharf\"\nrepo = \"pywharf-pkg-repo\"\n```\n\nThe GitHub backend accepts [personal access token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) as the repository secret. The `pywharf` server calls GitHub API with PAT to operate on packages. You can authorize user with read or write permission based on [team role](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization).\n\n#### Initialize the repository\n\nTo initialize a GitHub repository as the storage backend, run the command `github.init_pkg_repo`:\n\n```shell\ndocker run --rm pywharf/pywharf:0.2.3 \\\n github.init_pkg_repo \\\n --name pywharf-pkg-repo \\\n --owner pywharf \\\n --repo pywharf-pkg-repo \\\n --token <personal-access-token> \\\n --pywharf_version 0.2.3\n```\n\nThis will:\n\n- Create a new repository `<owner>/<repo>`.\n- Setup the GitHub workflow to update the remote index file if new package is published.\n- Print the configuration for you.\n\nIf you want to host the index in GitHub page, like https://pywharf.github.io/pywharf-pkg-repo/, add `--enable_gh_pages` to command execution.\n\n#### GitHub workflow integration\n\nTo use `pywharf` with GitHub workflow, take [thie main.yml](https://github.com/pywharf/pywharf/blob/master/.github/workflows/main.yml) as an example.\n\nFirstly, run the server as job service:\n\n```yaml\nservices:\n pywharf:\n image: pywharf/pywharf:0.2.3\n ports:\n - 8888:8888\n volumes:\n - pywharf-root:/pywharf-root\n env:\n PYWHARF_COMMAND: server\n PYWHARF_COMMAND_ROOT: /pywharf-root\n```\n\nSecondly, initialize the server with configuration and admin secret (Note: remember to [add the admin secret to your repository](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets) before using it):\n\n```yaml\nsteps:\n - name: Setup pywharf\n run: |\n curl \\\n -d \"config=${CONFIG}&admin_secret=${ADMIN_SECRET}\" \\\n -X POST \\\n http://localhost:8888/initialize/\n env:\n CONFIG: |\n [pywharf-pkg-repo]\n type = \"github\"\n owner = \"pywharf\"\n repo = \"pywharf-pkg-repo\"\n ADMIN_SECRET: |\n [pywharf-pkg-repo]\n type = \"github\"\n raw = \"${{ secrets.PYWHARF_PKG_REPO_TOKEN }}\"\n```\n\nAfterward, set `http://localhost:8888/simple/` as the repository url, and you are good to go.\n\n### File system\n\n#### Introduction\n\nYou can configure this backend to host the packages in the local file system.\n\n#### Configuration and secret\n\nPackage repository configuration of GitHub backend:\n\n- `type`: must set to `file_system`.\n- `read_secret`: defines the secret with read only permission.\n- `write_secret`: defines the secret with write permission.\n- `max_file_bytes` (optional): limit the maximum size (in bytes) of package. Default to `5368709119` (5 GB).\n- `sync_index_interval` (optional): the sleep time interval (in seconds) before taking the next local index file synchronization. Default to `60`.\n\nExample configuration:\n\n```toml\n[local-file-system]\ntype = \"file_system\"\nread_secret = \"foo\"\nwrite_secret = \"bar\"\n```\n\nTo use the API, user must provide either `read_secret` or `write_secret`.\n\n#### Initialize the package repository\n\nA folder will be created automatically to store the packages, with the path `<ROOT>/cache/<pkg_repo_name>/storage`.\n\n"
keywords = "private,pypi,packaging,dependency"
classifiers = "License :: OSI Approved :: MIT License"
download_url = ""
comment = ""
md5_digest = "cdef680f5ac39a4735fd3ca8ba428a16"
sha256_digest = "13e225746919015b591f999ea0ea8f5c63e3c35df163c0a5a04c80af88583c2d"
blake2_256_digest = "e785742707ca00f307e1bfed702b3a9a39a22b34fa350e4e4a570dbc5872aed2"
project_urls = "Repository, https://github.com/pywharf/pywharf"
requires_dist = "pywharf-core (==0.2.2)"
requires_python = ">=3.7,<4.0"
description_content_type = "text/markdown"
":action" = "file_upload"
protocol_version = "1"
distrib = "pywharf"
sha256 = "13e225746919015b591f999ea0ea8f5c63e3c35df163c0a5a04c80af88583c2d"
[[pkgs]]
type = "github"
distrib = "pywharf-core"
package = "pywharf_core-0.2.2-py3-none-any"
ext = "whl"
sha256 = "d88b3e05c241d071352334d435ce3e98356dd717743b966007bd713f361e8c3d"
url = "https://api.github.com/repos/pywharf/pywharf-pkg-repo/releases/assets/22789968"
[pkgs.meta]
name = "pywharf-core"
version = "0.2.2"
filetype = "bdist_wheel"
pyversion = "py3"
metadata_version = "2.1"
summary = "A private PyPI server powered by flexible backends."
home_page = "https://github.com/pywharf/pywharf-core"
author = "huntzhan"
author_email = "[email protected]"
maintainer = ""
maintainer_email = ""
license = "MIT"
description = "# pywharf-core\n\nThe core of https://github.com/pywharf/pywharf\n\n"
keywords = "private,pypi,packaging,dependency"
classifiers = "License :: OSI Approved :: MIT License"
download_url = ""
comment = ""
md5_digest = "34ca97f51726b70f264b6faef693cdab"
sha256_digest = "d88b3e05c241d071352334d435ce3e98356dd717743b966007bd713f361e8c3d"
blake2_256_digest = "0971be21e3eb6174a6e52bc107c515681c4bd97a789af89d775af9c56064b590"
project_urls = "Repository, https://github.com/pywharf/pywharf-core"
requires_dist = "Jinja2 (>=2.11.1,<3.0.0)"
requires_python = ">=3.7,<4.0"
description_content_type = "text/markdown"
":action" = "file_upload"
protocol_version = "1"
distrib = "pywharf-core"
sha256 = "d88b3e05c241d071352334d435ce3e98356dd717743b966007bd713f361e8c3d"
[[pkgs]]
type = "github"
distrib = "pywharf"
package = "pywharf-0.2.2-py3-none-any"
ext = "whl"
sha256 = "f448883269b80cc62831f9e322826ac59acab311d9d8990c2269c0dcef63ba99"
url = "https://api.github.com/repos/pywharf/pywharf-pkg-repo/releases/assets/22226515"
[pkgs.meta]
name = "pywharf"
version = "0.2.2"
filetype = "bdist_wheel"
pyversion = "py3"
metadata_version = "2.1"
summary = "A private PyPI server powered by flexible backends."
home_page = "https://github.com/pywharf/pywharf"
author = "huntzhan"
author_email = "[email protected]"
maintainer = ""
maintainer_email = ""
license = "MIT"
description = "<div align=\"center\">\n\n# pywharf\n\n**The private PyPI server powered by flexible backends.**\n\n[![build-and-push](https://github.com/pywharf/pywharf/workflows/build-and-push/badge.svg)](https://github.com/pywharf/pywharf/actions?query=workflow%3Abuild-and-push)\n[![license](https://img.shields.io/github/license/pywharf/pywharf)](https://github.com/pywharf/pywharf/blob/master/LICENSE)\n\n</div>\n\n* [pywharf](#pywharf)\n\t* [What is it?](#What-is-it?)\n\t* [Design](#Design)\n\t* [Usage](#Usage)\n\t\t* [Install from PyPI](#Install-from-PyPI)\n\t\t* [Using the docker image (recommended)](#Using-the-docker-image-(recommended))\n\t\t* [Run the server](#Run-the-server)\n\t\t* [Server API](#Server-API)\n\t\t* [Update index](#Update-index)\n\t\t* [Backend-specific commands](#Backend-specific-commands)\n\t\t* [Environment mode](#Environment-mode)\n\t* [Backends](#Backends)\n\t\t* [GitHub](#GitHub)\n\t\t* [File system](#File-system)\n\n------\n\n## What is it?\n\n`pywharf` allows you to deploy a PyPI server privately and keep your artifacts safe by leveraging the power (confidentiality, integrity and availability) of your storage backend. The backend mechanism is designed to be flexible so that the developer could support a new storage backend at a low cost.\n\nSupported backends:\n\n- GitHub. (Yes, you can now host your Python package in GitHub by using `pywharf`. )\n- File system.\n- ... (*Upcoming*)\n\n## Design\n\n<div align=\"center\"><img width=\"766\" alt=\"Screen Shot 2020-03-24 at 8 19 12 PM\" src=\"https://user-images.githubusercontent.com/5213906/77424853-c14e0480-6e0c-11ea-9a7f-879a68ada0a0.png\"></div>\n\nThe `pywharf` server serves as an abstraction layer between Python package management tools (pip/poetry/twine) and the storage backends:\n\n* Package management tools communicate with `pywharf` server, following [PEP 503 -- Simple Repository API](https://www.python.org/dev/peps/pep-0503/) for searching/downloading package, and [Legacy API](https://warehouse.pypa.io/api-reference/legacy/#upload-api) for uploading package.\n* `pywharf` server then performs file search/download/upload operations with some specific storage backend.\n\n## Usage\n\n### Install from PyPI\n\n```shell\npip install pywharf==0.2.1\n```\n\nThis should bring the execuable `pywharf` to your environment.\n\n```shell\n$ pywharf --help\nSYNOPSIS\n pywharf <command> <command_flags>\n\nSUPPORTED COMMANDS\n server\n update_index\n github.init_pkg_repo\n github.gen_gh_pages\n```\n\n### Using the docker image (recommended)\n\nDocker image: `pywharf/pywharf:0.2.1`. The image tag is the same as the package version in PyPI.\n\n```shell\n$ docker run --rm pywharf/pywharf:0.2.1 --help\nSYNOPSIS\n pywharf <command> <command_flags>\n\nSUPPORTED COMMANDS\n server\n update_index\n github.init_pkg_repo\n github.gen_gh_pages\n```\n\n### Run the server\n\nTo run the server, use the command `pywharf server`.\n\n```txt\nSYNOPSIS\n pywharf server ROOT <flags>\n\nPOSITIONAL ARGUMENTS\n ROOT (str):\n Path to the root folder. This folder is for logging,\n file-based lock and any other file I/O.\n\nFLAGS\n --config (Optional[str]):\n Path to the package repository config (TOML),\n or the file content if --config_or_admin_secret_can_be_text is set.\n Default to None.\n --admin_secret (Optional[str]):\n Path to the admin secrets config (TOML) with read/write permission.\n or the file content if --config_or_admin_secret_can_be_text is set.\n This field is required for local index synchronization.\n Default to None.\n --config_or_admin_secret_can_be_text (Optional[bool]):\n Enable passing the file content to --config or --admin_secret.\n Default to False.\n --auth_read_expires (int):\n The expiration time (in seconds) for read authentication.\n Default to 3600.\n --auth_write_expires (int):\n The expiration time (in seconds) for write authentication.\n Default to 300.\n --extra_index_url (str):\n Extra index url for redirection in case package not found.\n If set to empty string explicitly redirection will be suppressed.\n Default to 'https://pypi.org/simple/'.\n --debug (bool):\n Enable debug mode.\n Default to False.\n --host (str):\n The interface to bind to.\n Default to '0.0.0.0'.\n --port (int):\n The port to bind to.\n Default to 8888.\n **waitress_options (Dict[str, Any]):\n Optional arguments that `waitress.serve` takes.\n Details in https://docs.pylonsproject.org/projects/waitress/en/stable/arguments.html.\n Default to {}.\n```\n\nIn short, the configuration passed to `--config` defines mappings from `pkg_repo_name` to backend-specific settings. In other words, a single server instance can be configured to connect to multiple backends.\n\nExampe of the configuration file passed to `--config`:\n\n```toml\n[pywharf-pkg-repo]\ntype = \"github\"\nowner = \"pywharf\"\nrepo = \"pywharf-pkg-repo\"\n\n[local-file-system]\ntype = \"file_system\"\nread_secret = \"foo\"\nwrite_secret = \"bar\"\n```\n\nExampe of the admin secret file passed to `--admin_secret`:\n\n```toml\n[pywharf-pkg-repo]\ntype = \"github\"\nraw = \"<personal-access-token>\"\n\n[local-file-system]\ntype = \"file_system\"\nraw = \"foo\"\n```\n\nExample run:\n\n```shell\ndocker run --rm \\\n -v /path/to/root:/pywharf-root \\\n -v /path/to/config.toml:/config.toml \\\n -v /path/to/admin_secret.toml:/admin_secret.toml \\\n -p 8888:8888 \\\n pywharf/pywharf:0.2.1 \\\n server \\\n /pywharf-root \\\n --config=/config.toml \\\n --admin_secret=/admin_secret.toml\n```\n\n### Server API\n\n#### Authentication in shell\n\nUser must provide the `pkg_repo_name` and their secret in most of the API calls so that the server can find which backend to operate and determine whether the operation is permitted or not. The `pkg_repo_name` and the secret should be provided in [basic access authentication](https://en.wikipedia.org/wiki/Basic_access_authentication).\n\nSome package management tools will handle the authentication behind the screen, for example,\n\n* Twine: to set the environment variables `TWINE_USERNAME` and `TWINE_PASSWORD`. [ref](https://github.com/pypa/twine#environment-variables)\n* Poetry: [Configuring credentials](https://python-poetry.org/docs/repositories/#configuring-credentials).\n\nSome will not, for example,\n\n* Pip: you need to prepend `<pkg_repo_name>:<secret>@` to the hostname in the URL manually like this `https://[username[:password]@]pypi.company.com/simple`. [ref](https://pip.pypa.io/en/stable/user_guide/#basic-authentication-credentials)\n\n#### Authentication in browser\n\nYou need to visit `/login` page to submit `pkg_repo_name` and the secret, since most of the browsers today don't support prepending `<username>:<password>@` to the hostname in the URL. The `pkg_repo_name` and the secret will be stored in the session cookies. To reset, visit `/logout` .\n\nExample: `http://localhost:8888/login/`\n\n<div align=\"center\"><img width=\"600\" alt=\"Screen Shot 2020-03-25 at 12 36 03 PM\" src=\"https://user-images.githubusercontent.com/5213906/77502233-40871b00-6e95-11ea-8ac9-4844d7067ed2.png\"></div>\n\n\n#### PEP-503, Legacy API\n\nThe server follows [PEP 503 -- Simple Repository API](https://www.python.org/dev/peps/pep-0503/) and [Legacy API](https://warehouse.pypa.io/api-reference/legacy/#upload-api) to define APIs for searching/downloading/uploading package:\n\n* `GET /simple/`: List all distributions.\n* `GET /simple/<distrib>/`: List all packages in a distribution.\n* `GET /simple/<distrib>/<filename>`: Download a package file.\n* `POST /simple/`: Upload a package file.\n\nIn a nutshell, you need to set the \"index url / repository url / ...\" to `http://<host>:<port>/simple/` for the package management tool.\n\n#### Server management\n\n##### `GET /index_mtime`\n\nGet the last index index synchronization timestamp.\n\n```shell\n$ curl http://debug:foo@localhost:8888/index_mtime/\n1584379892\n```\n\n##### `POST /initialize`\n\nSubmit configuration and (re-)initialize the server. User can change the package repository configuration on-the-fly with this API.\n\n```shell\n# POST the file content.\n$ curl \\\n -d \"config=${CONFIG}&admin_secret=${ADMIN_SECRET}\" \\\n -X POST \\\n http://localhost:8888/initialize/\n\n# Or, POST the file.\n$ curl \\\n -F 'config=@/path/to/config.toml' \\\n -F 'admin_secret=@/path/to/admin_secret.toml' \\\n http://localhost:8888/initialize/\n```\n\n### Update index\n\n<div align=\"center\"><img width=\"636\" alt=\"Screen Shot 2020-03-25 at 5 39 19 PM\" src=\"https://user-images.githubusercontent.com/5213906/77522697-9a043f80-6ebf-11ea-95e6-9a086db7af2e.png\"></div>\n\nIndex file is used to track all published packages in a specific time:\n\n* *Remote index file*: the index file sotred in the backend. By design, this file is only updated by a standalone `update index` service and will not be updated by the `pywharf` server.\n* *Local index file*: the index file synchronized from the remote index file by the `pywharf` server\n\nTo update the remote index file, use the command `pywharf update_index`:\n\n```txt\nSYNOPSIS\n pywharf update_index TYPE NAME <flags>\n\nPOSITIONAL ARGUMENTS\n TYPE (str):\n Backend type.\n NAME (str):\n Name of config.\n\nFLAGS\n --secret (Optional[str]):\n The secret with write permission.\n --secret_env (Optional[str]):\n Instead of passing the secret through --secret,\n the secret could be loaded from the environment variable.\n **pkg_repo_configs (Dict[str, Any]):\n Any other backend-specific configs are allowed.\n```\n\nBackend developer could setup an `update index` service by invoking `pywharf update_index` command.\n\n### Backend-specific commands\n\nThe backend registration mechanism will hook up the backend-specific commands to `pywharf`. As illustrated, commands `github.init_pkg_repo` and `github.gen_gh_pages` are registered by `github` backend.\n\n```shell\n$ pywharf --help\nSYNOPSIS\n pywharf <command> <command_flags>\n\nSUPPORTED COMMANDS\n server\n update_index\n github.init_pkg_repo\n github.gen_gh_pages\n```\n\n### Environment mode\n\nIf no argument is passed, `pywharf` will try to load the arguments from the environment variables. This mode would be helpful if passing argument in shell is not possible.\n\nThe format:\n\n- `PYWHARF_COMMAND`: to set `<command>`.\n- `PYWHARF_COMMAND_<FLAG>`: to set the flag of `<command>`.\n\n## Backends\n\n### GitHub\n\n#### Introduction\n\n`pywharf` will help you setup a new GitHub repository to host your package. You package will be published as repository release and secured by personal access token. Take https://github.com/pywharf/pywharf-pkg-repo and https://pywharf.github.io/pywharf-pkg-repo/ as an example.\n\n#### Configuration and secret\n\nPackage repository configuration of GitHub backend:\n\n- `type`: must set to `github`.\n- `owner`: repository owner.\n- `repo`: repository name.\n- `branch` (optional): the branch to store the remote index file. Default to `master`.\n- `index_filename` (optional): the name of remote index file. Default to `index.toml`.\n- `max_file_bytes` (optional): limit the maximum size (in bytes) of package. Default to `2147483647` since *each file included in a release must be under 2 GB*, [as restricted by GitHub](https://help.github.com/en/github/administering-a-repository/about-releases#storage-and-bandwidth-quotas) .\n- `sync_index_interval` (optional): the sleep time interval (in seconds) before taking the next local index file synchronization. Default to `60`.\n\nExample configuration of https://github.com/pywharf/pywharf-pkg-repo:\n\n```toml\n[pywharf-pkg-repo]\ntype = \"github\"\nowner = \"pywharf\"\nrepo = \"pywharf-pkg-repo\"\n```\n\nThe GitHub backend accepts [personal access token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) as the repository secret. The `pywharf` server calls GitHub API with PAT to operate on packages. You can authorize user with read or write permission based on [team role](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization).\n\n#### Initialize the repository\n\nTo initialize a GitHub repository as the storage backend, run the command `github.init_pkg_repo`:\n\n```shell\ndocker run --rm pywharf/pywharf:0.2.1 \\\n github.init_pkg_repo \\\n --name pywharf-pkg-repo \\\n --owner pywharf \\\n --repo pywharf-pkg-repo \\\n --token <personal-access-token>\n```\n\nThis will:\n\n- Create a new repository `<owner>/<repo>`.\n- Setup the GitHub workflow to update the remote index file if new package is published.\n- Print the configuration for you.\n\nIf you want to host the index in GitHub page, like https://pywharf.github.io/pywharf-pkg-repo/, add `--enable_gh_pages` to command execution.\n\n#### GitHub workflow integration\n\nTo use `pywharf` with GitHub workflow, take [thie main.yml](https://github.com/pywharf/pywharf/blob/master/.github/workflows/main.yml) as an example.\n\nFirstly, run the server as job service:\n\n```yaml\nservices:\n pywharf:\n image: pywharf/pywharf:0.2.1\n ports:\n - 8888:8888\n volumes:\n - pywharf-root:/pywharf-root\n env:\n PYWHARF_COMMAND: server\n PYWHARF_COMMAND_ROOT: /pywharf-root\n```\n\nSecondly, initialize the server with configuration and admin secret (Note: remember to [add the admin secret to your repository](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets) before using it):\n\n```yaml\nsteps:\n - name: Setup pywharf\n run: |\n curl \\\n -d \"config=${CONFIG}&admin_secret=${ADMIN_SECRET}\" \\\n -X POST \\\n http://localhost:8888/initialize/\n env:\n CONFIG: |\n [pywharf-pkg-repo]\n type = \"github\"\n owner = \"pywharf\"\n repo = \"pywharf-pkg-repo\"\n ADMIN_SECRET: |\n [pywharf-pkg-repo]\n type = \"github\"\n raw = \"${{ secrets.PYWHARF_PKG_REPO_TOKEN }}\"\n```\n\nAfterward, set `http://localhost:8888/simple/` as the repository url, and you are good to go.\n\n### File system\n\n#### Introduction\n\nYou can configure this backend to host the packages in the local file system.\n\n#### Configuration and secret\n\nPackage repository configuration of GitHub backend:\n\n- `type`: must set to `file_system`.\n- `read_secret`: defines the secret with read only permission.\n- `write_secret`: defines the secret with write permission.\n- `max_file_bytes` (optional): limit the maximum size (in bytes) of package. Default to `5368709119` (5 GB).\n- `sync_index_interval` (optional): the sleep time interval (in seconds) before taking the next local index file synchronization. Default to `60`.\n\nExample configuration:\n\n```toml\n[local-file-system]\ntype = \"file_system\"\nread_secret = \"foo\"\nwrite_secret = \"bar\"\n```\n\nTo use the API, user must provide either `read_secret` or `write_secret`.\n\n#### Initialize the package repository\n\nA folder will be created automatically to store the packages, with the path `<ROOT>/cache/<pkg_repo_name>/storage`.\n\n"
keywords = "private,pypi,packaging,dependency"
classifiers = "License :: OSI Approved :: MIT License"
download_url = ""
comment = ""
md5_digest = "9acfca5771237a316132245e76f0b0cf"
sha256_digest = "f448883269b80cc62831f9e322826ac59acab311d9d8990c2269c0dcef63ba99"
blake2_256_digest = "d16a1dc0d14953b959eb5b127ed67405291eb23c47484a79b37cfbd9d68c3f78"
project_urls = "Repository, https://github.com/pywharf/pywharf"
requires_dist = "pywharf-core (==0.2.1)"
requires_python = ">=3.7,<4.0"
description_content_type = "text/markdown"
":action" = "file_upload"
protocol_version = "1"
distrib = "pywharf"
sha256 = "f448883269b80cc62831f9e322826ac59acab311d9d8990c2269c0dcef63ba99"
[[pkgs]]
type = "github"
distrib = "pywharf"
package = "pywharf-0.2.2a0-py3-none-any"
ext = "whl"
sha256 = "80e97766b52697eb92740dc155e5afaea1eb0dde4e14ade41df3e738da31410d"
url = "https://api.github.com/repos/pywharf/pywharf-pkg-repo/releases/assets/22226301"
[pkgs.meta]
name = "pywharf"
version = "0.2.2a0"
filetype = "bdist_wheel"
pyversion = "py3"
metadata_version = "2.1"
summary = "A private PyPI server powered by flexible backends."
home_page = "https://github.com/pywharf/pywharf"
author = "huntzhan"
author_email = "[email protected]"
maintainer = ""
maintainer_email = ""
license = "MIT"
description = "<div align=\"center\">\n\n# pywharf\n\n**The private PyPI server powered by flexible backends.**\n\n[![build-and-push](https://github.com/pywharf/pywharf/workflows/build-and-push/badge.svg)](https://github.com/pywharf/pywharf/actions?query=workflow%3Abuild-and-push)\n[![license](https://img.shields.io/github/license/pywharf/pywharf)](https://github.com/pywharf/pywharf/blob/master/LICENSE)\n\n</div>\n\n* [pywharf](#pywharf)\n\t* [What is it?](#What-is-it?)\n\t* [Design](#Design)\n\t* [Usage](#Usage)\n\t\t* [Install from PyPI](#Install-from-PyPI)\n\t\t* [Using the docker image (recommended)](#Using-the-docker-image-(recommended))\n\t\t* [Run the server](#Run-the-server)\n\t\t* [Server API](#Server-API)\n\t\t* [Update index](#Update-index)\n\t\t* [Backend-specific commands](#Backend-specific-commands)\n\t\t* [Environment mode](#Environment-mode)\n\t* [Backends](#Backends)\n\t\t* [GitHub](#GitHub)\n\t\t* [File system](#File-system)\n\n------\n\n## What is it?\n\n`pywharf` allows you to deploy a PyPI server privately and keep your artifacts safe by leveraging the power (confidentiality, integrity and availability) of your storage backend. The backend mechanism is designed to be flexible so that the developer could support a new storage backend at a low cost.\n\nSupported backends:\n\n- GitHub. (Yes, you can now host your Python package in GitHub by using `pywharf`. )\n- File system.\n- ... (*Upcoming*)\n\n## Design\n\n<div align=\"center\"><img width=\"766\" alt=\"Screen Shot 2020-03-24 at 8 19 12 PM\" src=\"https://user-images.githubusercontent.com/5213906/77424853-c14e0480-6e0c-11ea-9a7f-879a68ada0a0.png\"></div>\n\nThe `pywharf` server serves as an abstraction layer between Python package management tools (pip/poetry/twine) and the storage backends:\n\n* Package management tools communicate with `pywharf` server, following [PEP 503 -- Simple Repository API](https://www.python.org/dev/peps/pep-0503/) for searching/downloading package, and [Legacy API](https://warehouse.pypa.io/api-reference/legacy/#upload-api) for uploading package.\n* `pywharf` server then performs file search/download/upload operations with some specific storage backend.\n\n## Usage\n\n### Install from PyPI\n\n```shell\npip install pywharf==0.2.1\n```\n\nThis should bring the execuable `pywharf` to your environment.\n\n```shell\n$ pywharf --help\nSYNOPSIS\n pywharf <command> <command_flags>\n\nSUPPORTED COMMANDS\n server\n update_index\n github.init_pkg_repo\n github.gen_gh_pages\n```\n\n### Using the docker image (recommended)\n\nDocker image: `pywharf/pywharf:0.2.1`. The image tag is the same as the package version in PyPI.\n\n```shell\n$ docker run --rm pywharf/pywharf:0.2.1 --help\nSYNOPSIS\n pywharf <command> <command_flags>\n\nSUPPORTED COMMANDS\n server\n update_index\n github.init_pkg_repo\n github.gen_gh_pages\n```\n\n### Run the server\n\nTo run the server, use the command `pywharf server`.\n\n```txt\nSYNOPSIS\n pywharf server ROOT <flags>\n\nPOSITIONAL ARGUMENTS\n ROOT (str):\n Path to the root folder. This folder is for logging,\n file-based lock and any other file I/O.\n\nFLAGS\n --config (Optional[str]):\n Path to the package repository config (TOML),\n or the file content if --config_or_admin_secret_can_be_text is set.\n Default to None.\n --admin_secret (Optional[str]):\n Path to the admin secrets config (TOML) with read/write permission.\n or the file content if --config_or_admin_secret_can_be_text is set.\n This field is required for local index synchronization.\n Default to None.\n --config_or_admin_secret_can_be_text (Optional[bool]):\n Enable passing the file content to --config or --admin_secret.\n Default to False.\n --auth_read_expires (int):\n The expiration time (in seconds) for read authentication.\n Default to 3600.\n --auth_write_expires (int):\n The expiration time (in seconds) for write authentication.\n Default to 300.\n --extra_index_url (str):\n Extra index url for redirection in case package not found.\n If set to empty string explicitly redirection will be suppressed.\n Default to 'https://pypi.org/simple/'.\n --debug (bool):\n Enable debug mode.\n Default to False.\n --host (str):\n The interface to bind to.\n Default to '0.0.0.0'.\n --port (int):\n The port to bind to.\n Default to 8888.\n **waitress_options (Dict[str, Any]):\n Optional arguments that `waitress.serve` takes.\n Details in https://docs.pylonsproject.org/projects/waitress/en/stable/arguments.html.\n Default to {}.\n```\n\nIn short, the configuration passed to `--config` defines mappings from `pkg_repo_name` to backend-specific settings. In other words, a single server instance can be configured to connect to multiple backends.\n\nExampe of the configuration file passed to `--config`:\n\n```toml\n[pywharf-pkg-repo]\ntype = \"github\"\nowner = \"pywharf\"\nrepo = \"pywharf-pkg-repo\"\n\n[local-file-system]\ntype = \"file_system\"\nread_secret = \"foo\"\nwrite_secret = \"bar\"\n```\n\nExampe of the admin secret file passed to `--admin_secret`:\n\n```toml\n[pywharf-pkg-repo]\ntype = \"github\"\nraw = \"<personal-access-token>\"\n\n[local-file-system]\ntype = \"file_system\"\nraw = \"foo\"\n```\n\nExample run:\n\n```shell\ndocker run --rm \\\n -v /path/to/root:/pywharf-root \\\n -v /path/to/config.toml:/config.toml \\\n -v /path/to/admin_secret.toml:/admin_secret.toml \\\n -p 8888:8888 \\\n pywharf/pywharf:0.2.1 \\\n server \\\n /pywharf-root \\\n --config=/config.toml \\\n --admin_secret=/admin_secret.toml\n```\n\n### Server API\n\n#### Authentication in shell\n\nUser must provide the `pkg_repo_name` and their secret in most of the API calls so that the server can find which backend to operate and determine whether the operation is permitted or not. The `pkg_repo_name` and the secret should be provided in [basic access authentication](https://en.wikipedia.org/wiki/Basic_access_authentication).\n\nSome package management tools will handle the authentication behind the screen, for example,\n\n* Twine: to set the environment variables `TWINE_USERNAME` and `TWINE_PASSWORD`. [ref](https://github.com/pypa/twine#environment-variables)\n* Poetry: [Configuring credentials](https://python-poetry.org/docs/repositories/#configuring-credentials).\n\nSome will not, for example,\n\n* Pip: you need to prepend `<pkg_repo_name>:<secret>@` to the hostname in the URL manually like this `https://[username[:password]@]pypi.company.com/simple`. [ref](https://pip.pypa.io/en/stable/user_guide/#basic-authentication-credentials)\n\n#### Authentication in browser\n\nYou need to visit `/login` page to submit `pkg_repo_name` and the secret, since most of the browsers today don't support prepending `<username>:<password>@` to the hostname in the URL. The `pkg_repo_name` and the secret will be stored in the session cookies. To reset, visit `/logout` .\n\nExample: `http://localhost:8888/login/`\n\n<div align=\"center\"><img width=\"600\" alt=\"Screen Shot 2020-03-25 at 12 36 03 PM\" src=\"https://user-images.githubusercontent.com/5213906/77502233-40871b00-6e95-11ea-8ac9-4844d7067ed2.png\"></div>\n\n\n#### PEP-503, Legacy API\n\nThe server follows [PEP 503 -- Simple Repository API](https://www.python.org/dev/peps/pep-0503/) and [Legacy API](https://warehouse.pypa.io/api-reference/legacy/#upload-api) to define APIs for searching/downloading/uploading package:\n\n* `GET /simple/`: List all distributions.\n* `GET /simple/<distrib>/`: List all packages in a distribution.\n* `GET /simple/<distrib>/<filename>`: Download a package file.\n* `POST /simple/`: Upload a package file.\n\nIn a nutshell, you need to set the \"index url / repository url / ...\" to `http://<host>:<port>/simple/` for the package management tool.\n\n#### Server management\n\n##### `GET /index_mtime`\n\nGet the last index index synchronization timestamp.\n\n```shell\n$ curl http://debug:foo@localhost:8888/index_mtime/\n1584379892\n```\n\n##### `POST /initialize`\n\nSubmit configuration and (re-)initialize the server. User can change the package repository configuration on-the-fly with this API.\n\n```shell\n# POST the file content.\n$ curl \\\n -d \"config=${CONFIG}&admin_secret=${ADMIN_SECRET}\" \\\n -X POST \\\n http://localhost:8888/initialize/\n\n# Or, POST the file.\n$ curl \\\n -F 'config=@/path/to/config.toml' \\\n -F 'admin_secret=@/path/to/admin_secret.toml' \\\n http://localhost:8888/initialize/\n```\n\n### Update index\n\n<div align=\"center\"><img width=\"636\" alt=\"Screen Shot 2020-03-25 at 5 39 19 PM\" src=\"https://user-images.githubusercontent.com/5213906/77522697-9a043f80-6ebf-11ea-95e6-9a086db7af2e.png\"></div>\n\nIndex file is used to track all published packages in a specific time:\n\n* *Remote index file*: the index file sotred in the backend. By design, this file is only updated by a standalone `update index` service and will not be updated by the `pywharf` server.\n* *Local index file*: the index file synchronized from the remote index file by the `pywharf` server\n\nTo update the remote index file, use the command `pywharf update_index`:\n\n```txt\nSYNOPSIS\n pywharf update_index TYPE NAME <flags>\n\nPOSITIONAL ARGUMENTS\n TYPE (str):\n Backend type.\n NAME (str):\n Name of config.\n\nFLAGS\n --secret (Optional[str]):\n The secret with write permission.\n --secret_env (Optional[str]):\n Instead of passing the secret through --secret,\n the secret could be loaded from the environment variable.\n **pkg_repo_configs (Dict[str, Any]):\n Any other backend-specific configs are allowed.\n```\n\nBackend developer could setup an `update index` service by invoking `pywharf update_index` command.\n\n### Backend-specific commands\n\nThe backend registration mechanism will hook up the backend-specific commands to `pywharf`. As illustrated, commands `github.init_pkg_repo` and `github.gen_gh_pages` are registered by `github` backend.\n\n```shell\n$ pywharf --help\nSYNOPSIS\n pywharf <command> <command_flags>\n\nSUPPORTED COMMANDS\n server\n update_index\n github.init_pkg_repo\n github.gen_gh_pages\n```\n\n### Environment mode\n\nIf no argument is passed, `pywharf` will try to load the arguments from the environment variables. This mode would be helpful if passing argument in shell is not possible.\n\nThe format:\n\n- `PYWHARF_COMMAND`: to set `<command>`.\n- `PYWHARF_COMMAND_<FLAG>`: to set the flag of `<command>`.\n\n## Backends\n\n### GitHub\n\n#### Introduction\n\n`pywharf` will help you setup a new GitHub repository to host your package. You package will be published as repository release and secured by personal access token. Take https://github.com/pywharf/pywharf-pkg-repo and https://pywharf.github.io/pywharf-pkg-repo/ as an example.\n\n#### Configuration and secret\n\nPackage repository configuration of GitHub backend:\n\n- `type`: must set to `github`.\n- `owner`: repository owner.\n- `repo`: repository name.\n- `branch` (optional): the branch to store the remote index file. Default to `master`.\n- `index_filename` (optional): the name of remote index file. Default to `index.toml`.\n- `max_file_bytes` (optional): limit the maximum size (in bytes) of package. Default to `2147483647` since *each file included in a release must be under 2 GB*, [as restricted by GitHub](https://help.github.com/en/github/administering-a-repository/about-releases#storage-and-bandwidth-quotas) .\n- `sync_index_interval` (optional): the sleep time interval (in seconds) before taking the next local index file synchronization. Default to `60`.\n\nExample configuration of https://github.com/pywharf/pywharf-pkg-repo:\n\n```toml\n[pywharf-pkg-repo]\ntype = \"github\"\nowner = \"pywharf\"\nrepo = \"pywharf-pkg-repo\"\n```\n\nThe GitHub backend accepts [personal access token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) as the repository secret. The `pywharf` server calls GitHub API with PAT to operate on packages. You can authorize user with read or write permission based on [team role](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization).\n\n#### Initialize the repository\n\nTo initialize a GitHub repository as the storage backend, run the command `github.init_pkg_repo`:\n\n```shell\ndocker run --rm pywharf/pywharf:0.2.1 \\\n github.init_pkg_repo \\\n --name pywharf-pkg-repo \\\n --owner pywharf \\\n --repo pywharf-pkg-repo \\\n --token <personal-access-token>\n```\n\nThis will:\n\n- Create a new repository `<owner>/<repo>`.\n- Setup the GitHub workflow to update the remote index file if new package is published.\n- Print the configuration for you.\n\nIf you want to host the index in GitHub page, like https://pywharf.github.io/pywharf-pkg-repo/, add `--enable_gh_pages` to command execution.\n\n#### GitHub workflow integration\n\nTo use `pywharf` with GitHub workflow, take [thie main.yml](https://github.com/pywharf/pywharf/blob/master/.github/workflows/main.yml) as an example.\n\nFirstly, run the server as job service:\n\n```yaml\nservices:\n pywharf:\n image: pywharf/pywharf:0.2.1\n ports:\n - 8888:8888\n volumes:\n - pywharf-root:/pywharf-root\n env:\n PYWHARF_COMMAND: server\n PYWHARF_COMMAND_ROOT: /pywharf-root\n```\n\nSecondly, initialize the server with configuration and admin secret (Note: remember to [add the admin secret to your repository](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets) before using it):\n\n```yaml\nsteps:\n - name: Setup pywharf\n run: |\n curl \\\n -d \"config=${CONFIG}&admin_secret=${ADMIN_SECRET}\" \\\n -X POST \\\n http://localhost:8888/initialize/\n env:\n CONFIG: |\n [pywharf-pkg-repo]\n type = \"github\"\n owner = \"pywharf\"\n repo = \"pywharf-pkg-repo\"\n ADMIN_SECRET: |\n [pywharf-pkg-repo]\n type = \"github\"\n raw = \"${{ secrets.PYWHARF_PKG_REPO_TOKEN }}\"\n```\n\nAfterward, set `http://localhost:8888/simple/` as the repository url, and you are good to go.\n\n### File system\n\n#### Introduction\n\nYou can configure this backend to host the packages in the local file system.\n\n#### Configuration and secret\n\nPackage repository configuration of GitHub backend:\n\n- `type`: must set to `file_system`.\n- `read_secret`: defines the secret with read only permission.\n- `write_secret`: defines the secret with write permission.\n- `max_file_bytes` (optional): limit the maximum size (in bytes) of package. Default to `5368709119` (5 GB).\n- `sync_index_interval` (optional): the sleep time interval (in seconds) before taking the next local index file synchronization. Default to `60`.\n\nExample configuration:\n\n```toml\n[local-file-system]\ntype = \"file_system\"\nread_secret = \"foo\"\nwrite_secret = \"bar\"\n```\n\nTo use the API, user must provide either `read_secret` or `write_secret`.\n\n#### Initialize the package repository\n\nA folder will be created automatically to store the packages, with the path `<ROOT>/cache/<pkg_repo_name>/storage`.\n\n"
keywords = "private,pypi,packaging,dependency"
classifiers = "License :: OSI Approved :: MIT License"
download_url = ""
comment = ""
md5_digest = "80a64804b7689466dc019aeeeb37f2bc"
sha256_digest = "80e97766b52697eb92740dc155e5afaea1eb0dde4e14ade41df3e738da31410d"
blake2_256_digest = "8ec4e87abcf85b4fab50d25b28766d0bd68989c2e0a1382a85684c5af664916b"
project_urls = "Repository, https://github.com/pywharf/pywharf"
requires_dist = "pywharf-core (==0.2.1)"
requires_python = ">=3.7,<4.0"
description_content_type = "text/markdown"
":action" = "file_upload"
protocol_version = "1"
distrib = "pywharf"
sha256 = "80e97766b52697eb92740dc155e5afaea1eb0dde4e14ade41df3e738da31410d"
[[pkgs]]
type = "github"
distrib = "pywharf-core"
package = "pywharf_core-0.2.1-py3-none-any"
ext = "whl"
sha256 = "f3df2522fd52ce8cdb5db0c3b9a5f591416f3b1af4e9e99ed33a6a2bbdd95c14"
url = "https://api.github.com/repos/pywharf/pywharf-pkg-repo/releases/assets/22225659"
[pkgs.meta]
name = "pywharf-core"
version = "0.2.1"
filetype = "bdist_wheel"
pyversion = "py3"
metadata_version = "2.1"
summary = "A private PyPI server powered by flexible backends."
home_page = "https://github.com/pywharf/pywharf-core"
author = "huntzhan"
author_email = "[email protected]"
maintainer = ""
maintainer_email = ""
license = "MIT"
description = "# pywharf-core\n\nThe core of https://github.com/pywharf/pywharf\n\n"
keywords = "private,pypi,packaging,dependency"
classifiers = "License :: OSI Approved :: MIT License"
download_url = ""
comment = ""
md5_digest = "306465474909a80079ddf4738b5a12f6"
sha256_digest = "f3df2522fd52ce8cdb5db0c3b9a5f591416f3b1af4e9e99ed33a6a2bbdd95c14"
blake2_256_digest = "9b689835700aa4fb6d365f9369cf2ad3ab8131eb6c0937677e9f31fa5b302e37"
project_urls = "Repository, https://github.com/pywharf/pywharf-core"
requires_dist = "Jinja2 (>=2.11.1,<3.0.0)"
requires_python = ">=3.7,<4.0"
description_content_type = "text/markdown"
":action" = "file_upload"
protocol_version = "1"
distrib = "pywharf-core"
sha256 = "f3df2522fd52ce8cdb5db0c3b9a5f591416f3b1af4e9e99ed33a6a2bbdd95c14"
[[pkgs]]
type = "github"
distrib = "pywharf-core"
package = "pywharf_core-0.2.1a0-py3-none-any"
ext = "whl"
sha256 = "19cd741db32e7b513ab438474babdcc04e5ed648616e7e8f75979a35b973c9c7"
url = "https://api.github.com/repos/pywharf/pywharf-pkg-repo/releases/assets/22223778"
[pkgs.meta]
name = "pywharf-core"
version = "0.2.1a0"
filetype = "bdist_wheel"
pyversion = "py3"
metadata_version = "2.1"
summary = "A private PyPI server powered by flexible backends."
home_page = "https://github.com/pywharf/pywharf-core"
author = "huntzhan"
author_email = "[email protected]"
maintainer = ""
maintainer_email = ""
license = "MIT"
description = "# pywharf-core\n\nThe core of https://github.com/pywharf/pywharf\n\n"
keywords = "private,pypi,packaging,dependency"
classifiers = "License :: OSI Approved :: MIT License"
download_url = ""
comment = ""
md5_digest = "10ac36349e3c2067c935d5f0a8cc122f"
sha256_digest = "19cd741db32e7b513ab438474babdcc04e5ed648616e7e8f75979a35b973c9c7"
blake2_256_digest = "97149ae0e4fd14987a6a47592ce50138c2baa185857d768c38ba0a84dc581ec3"
project_urls = "Repository, https://github.com/pywharf/pywharf-core"
requires_dist = "Jinja2 (>=2.11.1,<3.0.0)"
requires_python = ">=3.7,<4.0"
description_content_type = "text/markdown"
":action" = "file_upload"
protocol_version = "1"
distrib = "pywharf-core"
sha256 = "19cd741db32e7b513ab438474babdcc04e5ed648616e7e8f75979a35b973c9c7"
[[pkgs]]
type = "github"
distrib = "pywharf"
package = "pywharf-0.2.1-py3-none-any"
ext = "whl"
sha256 = "37fc1314afd5b9698768fd223d856cef46d24737115959e206c31d3368a7e405"
url = "https://api.github.com/repos/pywharf/pywharf-pkg-repo/releases/assets/19665395"
[pkgs.meta]
name = "pywharf"
version = "0.2.1"
filetype = "bdist_wheel"
pyversion = "py3"
metadata_version = "2.1"
summary = "A private PyPI server powered by flexible backends."
home_page = "https://github.com/pywharf/pywharf"
author = "huntzhan"
author_email = "[email protected]"
maintainer = ""
maintainer_email = ""
license = "MIT"
description = "<div align=\"center\">\n\n# pywharf\n\n**The private PyPI server powered by flexible backends.**\n\n[![build-and-push](https://github.com/pywharf/pywharf/workflows/build-and-push/badge.svg)](https://github.com/pywharf/pywharf/actions?query=workflow%3Abuild-and-push)\n[![license](https://img.shields.io/github/license/pywharf/pywharf)](https://github.com/pywharf/pywharf/blob/master/LICENSE)\n\n</div>\n\n* [pywharf](#pywharf)\n\t* [What is it?](#What-is-it?)\n\t* [Design](#Design)\n\t* [Usage](#Usage)\n\t\t* [Install from PyPI](#Install-from-PyPI)\n\t\t* [Using the docker image (recommended)](#Using-the-docker-image-(recommended))\n\t\t* [Run the server](#Run-the-server)\n\t\t* [Server API](#Server-API)\n\t\t* [Update index](#Update-index)\n\t\t* [Backend-specific commands](#Backend-specific-commands)\n\t\t* [Environment mode](#Environment-mode)\n\t* [Backends](#Backends)\n\t\t* [GitHub](#GitHub)\n\t\t* [File system](#File-system)\n\n------\n\n## What is it?\n\n`pywharf` allows you to deploy a PyPI server privately and keep your artifacts safe by leveraging the power (confidentiality, integrity and availability) of your storage backend. The backend mechanism is designed to be flexible so that the developer could support a new storage backend at a low cost.\n\nSupported backends:\n\n- GitHub. (Yes, you can now host your Python package in GitHub by using `pywharf`. )\n- File system.\n- ... (*Upcoming*)\n\n## Design\n\n<div align=\"center\"><img width=\"766\" alt=\"Screen Shot 2020-03-24 at 8 19 12 PM\" src=\"https://user-images.githubusercontent.com/5213906/77424853-c14e0480-6e0c-11ea-9a7f-879a68ada0a0.png\"></div>\n\nThe `pywharf` server serves as an abstraction layer between Python package management tools (pip/poetry/twine) and the storage backends:\n\n* Package management tools communicate with `pywharf` server, following [PEP 503 -- Simple Repository API](https://www.python.org/dev/peps/pep-0503/) for searching/downloading package, and [Legacy API](https://warehouse.pypa.io/api-reference/legacy/#upload-api) for uploading package.\n* `pywharf` server then performs file search/download/upload operations with some specific storage backend.\n\n## Usage\n\n### Install from PyPI\n\n```shell\npip install pywharf==0.2.1\n```\n\nThis should bring the execuable `pywharf` to your environment.\n\n```shell\n$ pywharf --help\nSYNOPSIS\n pywharf <command> <command_flags>\n\nSUPPORTED COMMANDS\n server\n update_index\n github.init_pkg_repo\n github.gen_gh_pages\n```\n\n### Using the docker image (recommended)\n\nDocker image: `pywharf/pywharf:0.2.1`. The image tag is the same as the package version in PyPI.\n\n```shell\n$ docker run --rm pywharf/pywharf:0.2.1 --help\nSYNOPSIS\n pywharf <command> <command_flags>\n\nSUPPORTED COMMANDS\n server\n update_index\n github.init_pkg_repo\n github.gen_gh_pages\n```\n\n### Run the server\n\nTo run the server, use the command `pywharf server`.\n\n```txt\nSYNOPSIS\n pywharf server ROOT <flags>\n\nPOSITIONAL ARGUMENTS\n ROOT (str):\n Path to the root folder. This folder is for logging,\n file-based lock and any other file I/O.\n\nFLAGS\n --config (Optional[str]):\n Path to the package repository config (TOML),\n or the file content if --config_or_admin_secret_can_be_text is set.\n Default to None.\n --admin_secret (Optional[str]):\n Path to the admin secrets config (TOML) with read/write permission.\n or the file content if --config_or_admin_secret_can_be_text is set.\n This field is required for local index synchronization.\n Default to None.\n --config_or_admin_secret_can_be_text (Optional[bool]):\n Enable passing the file content to --config or --admin_secret.\n Default to False.\n --auth_read_expires (int):\n The expiration time (in seconds) for read authentication.\n Default to 3600.\n --auth_write_expires (int):\n The expiration time (in seconds) for write authentication.\n Default to 300.\n --extra_index_url (str):\n Extra index url for redirection in case package not found.\n If set to empty string explicitly redirection will be suppressed.\n Default to 'https://pypi.org/simple/'.\n --debug (bool):\n Enable debug mode.\n Default to False.\n --host (str):\n The interface to bind to.\n Default to '0.0.0.0'.\n --port (int):\n The port to bind to.\n Default to 8888.\n **waitress_options (Dict[str, Any]):\n Optional arguments that `waitress.serve` takes.\n Details in https://docs.pylonsproject.org/projects/waitress/en/stable/arguments.html.\n Default to {}.\n```\n\nIn short, the configuration passed to `--config` defines mappings from `pkg_repo_name` to backend-specific settings. In other words, a single server instance can be configured to connect to multiple backends.\n\nExampe of the configuration file passed to `--config`:\n\n```toml\n[pywharf-pkg-repo]\ntype = \"github\"\nowner = \"pywharf\"\nrepo = \"pywharf-pkg-repo\"\n\n[local-file-system]\ntype = \"file_system\"\nread_secret = \"foo\"\nwrite_secret = \"bar\"\n```\n\nExampe of the admin secret file passed to `--admin_secret`:\n\n```toml\n[pywharf-pkg-repo]\ntype = \"github\"\nraw = \"<personal-access-token>\"\n\n[local-file-system]\ntype = \"file_system\"\nraw = \"foo\"\n```\n\nExample run:\n\n```shell\ndocker run --rm \\\n -v /path/to/root:/pywharf-root \\\n -v /path/to/config.toml:/config.toml \\\n -v /path/to/admin_secret.toml:/admin_secret.toml \\\n -p 8888:8888 \\\n pywharf/pywharf:0.2.1 \\\n server \\\n /pywharf-root \\\n --config=/config.toml \\\n --admin_secret=/admin_secret.toml\n```\n\n### Server API\n\n#### Authentication in shell\n\nUser must provide the `pkg_repo_name` and their secret in most of the API calls so that the server can find which backend to operate and determine whether the operation is permitted or not. The `pkg_repo_name` and the secret should be provided in [basic access authentication](https://en.wikipedia.org/wiki/Basic_access_authentication).\n\nSome package management tools will handle the authentication behind the screen, for example,\n\n* Twine: to set the environment variables `TWINE_USERNAME` and `TWINE_PASSWORD`. [ref](https://github.com/pypa/twine#environment-variables)\n* Poetry: [Configuring credentials](https://python-poetry.org/docs/repositories/#configuring-credentials).\n\nSome will not, for example,\n\n* Pip: you need to prepend `<pkg_repo_name>:<secret>@` to the hostname in the URL manually like this `https://[username[:password]@]pypi.company.com/simple`. [ref](https://pip.pypa.io/en/stable/user_guide/#basic-authentication-credentials)\n\n#### Authentication in browser\n\nYou need to visit `/login` page to submit `pkg_repo_name` and the secret, since most of the browsers today don't support prepending `<username>:<password>@` to the hostname in the URL. The `pkg_repo_name` and the secret will be stored in the session cookies. To reset, visit `/logout` .\n\nExample: `http://localhost:8888/login/`\n\n<div align=\"center\"><img width=\"600\" alt=\"Screen Shot 2020-03-25 at 12 36 03 PM\" src=\"https://user-images.githubusercontent.com/5213906/77502233-40871b00-6e95-11ea-8ac9-4844d7067ed2.png\"></div>\n\n\n#### PEP-503, Legacy API\n\nThe server follows [PEP 503 -- Simple Repository API](https://www.python.org/dev/peps/pep-0503/) and [Legacy API](https://warehouse.pypa.io/api-reference/legacy/#upload-api) to define APIs for searching/downloading/uploading package:\n\n* `GET /simple/`: List all distributions.\n* `GET /simple/<distrib>/`: List all packages in a distribution.\n* `GET /simple/<distrib>/<filename>`: Download a package file.\n* `POST /simple/`: Upload a package file.\n\nIn a nutshell, you need to set the \"index url / repository url / ...\" to `http://<host>:<port>/simple/` for the package management tool.\n\n#### Server management\n\n##### `GET /index_mtime`\n\nGet the last index index synchronization timestamp.\n\n```shell\n$ curl http://debug:foo@localhost:8888/index_mtime/\n1584379892\n```\n\n##### `POST /initialize`\n\nSubmit configuration and (re-)initialize the server. User can change the package repository configuration on-the-fly with this API.\n\n```shell\n# POST the file content.\n$ curl \\\n -d \"config=${CONFIG}&admin_secret=${ADMIN_SECRET}\" \\\n -X POST \\\n http://localhost:8888/initialize/\n\n# Or, POST the file.\n$ curl \\\n -F 'config=@/path/to/config.toml' \\\n -F 'admin_secret=@/path/to/admin_secret.toml' \\\n http://localhost:8888/initialize/\n```\n\n### Update index\n\n<div align=\"center\"><img width=\"636\" alt=\"Screen Shot 2020-03-25 at 5 39 19 PM\" src=\"https://user-images.githubusercontent.com/5213906/77522697-9a043f80-6ebf-11ea-95e6-9a086db7af2e.png\"></div>\n\nIndex file is used to track all published packages in a specific time:\n\n* *Remote index file*: the index file sotred in the backend. By design, this file is only updated by a standalone `update index` service and will not be updated by the `pywharf` server.\n* *Local index file*: the index file synchronized from the remote index file by the `pywharf` server\n\nTo update the remote index file, use the command `pywharf update_index`:\n\n```txt\nSYNOPSIS\n pywharf update_index TYPE NAME <flags>\n\nPOSITIONAL ARGUMENTS\n TYPE (str):\n Backend type.\n NAME (str):\n Name of config.\n\nFLAGS\n --secret (Optional[str]):\n The secret with write permission.\n --secret_env (Optional[str]):\n Instead of passing the secret through --secret,\n the secret could be loaded from the environment variable.\n **pkg_repo_configs (Dict[str, Any]):\n Any other backend-specific configs are allowed.\n```\n\nBackend developer could setup an `update index` service by invoking `pywharf update_index` command.\n\n### Backend-specific commands\n\nThe backend registration mechanism will hook up the backend-specific commands to `pywharf`. As illustrated, commands `github.init_pkg_repo` and `github.gen_gh_pages` are registered by `github` backend.\n\n```shell\n$ pywharf --help\nSYNOPSIS\n pywharf <command> <command_flags>\n\nSUPPORTED COMMANDS\n server\n update_index\n github.init_pkg_repo\n github.gen_gh_pages\n```\n\n### Environment mode\n\nIf no argument is passed, `pywharf` will try to load the arguments from the environment variables. This mode would be helpful if passing argument in shell is not possible.\n\nThe format:\n\n- `PYWHARF_COMMAND`: to set `<command>`.\n- `PYWHARF_COMMAND_<FLAG>`: to set the flag of `<command>`.\n\n## Backends\n\n### GitHub\n\n#### Introduction\n\n`pywharf` will help you setup a new GitHub repository to host your package. You package will be published as repository release and secured by personal access token. Take https://github.com/pywharf/pywharf-pkg-repo and https://pywharf.github.io/pywharf-pkg-repo/ as an example.\n\n#### Configuration and secret\n\nPackage repository configuration of GitHub backend:\n\n- `type`: must set to `github`.\n- `owner`: repository owner.\n- `repo`: repository name.\n- `branch` (optional): the branch to store the remote index file. Default to `master`.\n- `index_filename` (optional): the name of remote index file. Default to `index.toml`.\n- `max_file_bytes` (optional): limit the maximum size (in bytes) of package. Default to `2147483647` since *each file included in a release must be under 2 GB*, [as restricted by GitHub](https://help.github.com/en/github/administering-a-repository/about-releases#storage-and-bandwidth-quotas) .\n- `sync_index_interval` (optional): the sleep time interval (in seconds) before taking the next local index file synchronization. Default to `60`.\n\nExample configuration of https://github.com/pywharf/pywharf-pkg-repo:\n\n```toml\n[pywharf-pkg-repo]\ntype = \"github\"\nowner = \"pywharf\"\nrepo = \"pywharf-pkg-repo\"\n```\n\nThe GitHub backend accepts [personal access token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) as the repository secret. The `pywharf` server calls GitHub API with PAT to operate on packages. You can authorize user with read or write permission based on [team role](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization).\n\n#### Initialize the repository\n\nTo initialize a GitHub repository as the storage backend, run the command `github.init_pkg_repo`:\n\n```shell\ndocker run --rm pywharf/pywharf:0.2.1 \\\n github.init_pkg_repo \\\n --name pywharf-pkg-repo \\\n --owner pywharf \\\n --repo pywharf-pkg-repo \\\n --token <personal-access-token>\n```\n\nThis will:\n\n- Create a new repository `<owner>/<repo>`.\n- Setup the GitHub workflow to update the remote index file if new package is published.\n- Print the configuration for you.\n\nIf you want to host the index in GitHub page, like https://pywharf.github.io/pywharf-pkg-repo/, add `--enable_gh_pages` to command execution.\n\n#### GitHub workflow integration\n\nTo use `pywharf` with GitHub workflow, take [thie main.yml](https://github.com/pywharf/pywharf/blob/master/.github/workflows/main.yml) as an example.\n\nFirstly, run the server as job service:\n\n```yaml\nservices:\n pywharf:\n image: pywharf/pywharf:0.2.1\n ports:\n - 8888:8888\n volumes:\n - pywharf-root:/pywharf-root\n env:\n PYWHARF_COMMAND: server\n PYWHARF_COMMAND_ROOT: /pywharf-root\n```\n\nSecondly, initialize the server with configuration and admin secret (Note: remember to [add the admin secret to your repository](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets) before using it):\n\n```yaml\nsteps:\n - name: Setup pywharf\n run: |\n curl \\\n -d \"config=${CONFIG}&admin_secret=${ADMIN_SECRET}\" \\\n -X POST \\\n http://localhost:8888/initialize/\n env:\n CONFIG: |\n [pywharf-pkg-repo]\n type = \"github\"\n owner = \"pywharf\"\n repo = \"pywharf-pkg-repo\"\n ADMIN_SECRET: |\n [pywharf-pkg-repo]\n type = \"github\"\n raw = \"${{ secrets.PYWHARF_PKG_REPO_TOKEN }}\"\n```\n\nAfterward, set `http://localhost:8888/simple/` as the repository url, and you are good to go.\n\n### File system\n\n#### Introduction\n\nYou can configure this backend to host the packages in the local file system.\n\n#### Configuration and secret\n\nPackage repository configuration of GitHub backend:\n\n- `type`: must set to `file_system`.\n- `read_secret`: defines the secret with read only permission.\n- `write_secret`: defines the secret with write permission.\n- `max_file_bytes` (optional): limit the maximum size (in bytes) of package. Default to `5368709119` (5 GB).\n- `sync_index_interval` (optional): the sleep time interval (in seconds) before taking the next local index file synchronization. Default to `60`.\n\nExample configuration:\n\n```toml\n[local-file-system]\ntype = \"file_system\"\nread_secret = \"foo\"\nwrite_secret = \"bar\"\n```\n\nTo use the API, user must provide either `read_secret` or `write_secret`.\n\n#### Initialize the package repository\n\nA folder will be created automatically to store the packages, with the path `<ROOT>/cache/<pkg_repo_name>/storage`.\n\n"
keywords = "private,pypi,packaging,dependency"
classifiers = "License :: OSI Approved :: MIT License"
download_url = ""
comment = ""
md5_digest = "f1feafdf9c6230a451e4e5868736977d"
sha256_digest = "37fc1314afd5b9698768fd223d856cef46d24737115959e206c31d3368a7e405"
blake2_256_digest = "4a232a3f2fa17e0ddbb9fd39c0ca5a6c5b2d59a997dee7289dec7163f4d1a46a"
project_urls = "Repository, https://github.com/pywharf/pywharf"
requires_dist = "pywharf-core (==0.2.0)"
requires_python = ">=3.7,<4.0"
description_content_type = "text/markdown"
":action" = "file_upload"
protocol_version = "1"
distrib = "pywharf"
sha256 = "37fc1314afd5b9698768fd223d856cef46d24737115959e206c31d3368a7e405"
[[pkgs]]
type = "github"
distrib = "pywharf"
package = "pywharf-0.2.0-py3-none-any"
ext = "whl"
sha256 = "f58f41699610cbe16413de9c7c5bfa689caaadfd1186e09c6f52d47dac57702a"
url = "https://api.github.com/repos/pywharf/pywharf-pkg-repo/releases/assets/19059433"
[pkgs.meta]
name = "pywharf"
version = "0.2.0"
filetype = "bdist_wheel"
pyversion = "py3"
metadata_version = "2.1"
summary = "A private PyPI server powered by flexible backends."
home_page = "https://github.com/pywharf/pywharf"
author = "huntzhan"
author_email = "[email protected]"
maintainer = ""
maintainer_email = ""
license = "MIT"
description = "<div align=\"center\">\n\n# pywharf\n\n**The private PyPI server powered by flexible backends.**\n\n[![build-and-push](https://github.com/pywharf/pywharf/workflows/build-and-push/badge.svg)](https://github.com/pywharf/pywharf/actions?query=workflow%3Abuild-and-push)\n[![license](https://img.shields.io/github/license/pywharf/pywharf)](https://github.com/pywharf/pywharf/blob/master/LICENSE)\n\n</div>\n\n* [Private PyPI](#Private-PyPI)\n\t* [What is it?](#What-is-it?)\n\t* [Design](#Design)\n\t* [Usage](#Usage)\n\t\t* [Install from PyPI](#Install-from-PyPI)\n\t\t* [Using the docker image (recommended)](#Using-the-docker-image-(recommended))\n\t\t* [Run the server](#Run-the-server)\n\t\t* [Server API](#Server-API)\n\t\t* [Update index](#Update-index)\n\t\t* [Backend-specific commands](#Backend-specific-commands)\n\t\t* [Environment mode](#Environment-mode)\n\t* [Backends](#Backends)\n\t\t* [GitHub](#GitHub)\n\t\t* [File system](#File-system)\n\n------\n\n## What is it?\n\n`pywharf` allows you to deploy a PyPI server privately and keep your artifacts safe by leveraging the power (confidentiality, integrity and availability) of your storage backend. The backend mechanism is designed to be flexible so that the developer could support a new storage backend at a low cost.\n\nSupported backends:\n\n- GitHub. (Yes, you can now host your Python package in GitHub by using `pywharf`. )\n- File system.\n- ... (*Upcoming*)\n\n## Design\n\n<div align=\"center\"><img width=\"766\" alt=\"Screen Shot 2020-03-24 at 8 19 12 PM\" src=\"https://user-images.githubusercontent.com/5213906/77424853-c14e0480-6e0c-11ea-9a7f-879a68ada0a0.png\"></div>\n\nThe `pywharf` server serves as an abstraction layer between Python package management tools (pip/poetry/twine) and the storage backends:\n\n* Package management tools communicate with `pywharf` server, following [PEP 503 -- Simple Repository API](https://www.python.org/dev/peps/pep-0503/) for searching/downloading package, and [Legacy API](https://warehouse.pypa.io/api-reference/legacy/#upload-api) for uploading package.\n* `pywharf` server then performs file search/download/upload operations with some specific storage backend.\n\n## Usage\n\n### Install from PyPI\n\n```shell\npip install pywharf==0.2.0\n```\n\nThis should bring the execuable `pywharf` to your environment.\n\n```shell\n$ pywharf --help\nSYNOPSIS\n pywharf <command> <command_flags>\n\nSUPPORTED COMMANDS\n server\n update_index\n github.init_pkg_repo\n github.gen_gh_pages\n```\n\n### Using the docker image (recommended)\n\nDocker image: `pywharf/pywharf:0.2.0`. The image tag is the same as the package version in PyPI.\n\n```shell\n$ docker run --rm pywharf/pywharf:0.2.0 --help\nSYNOPSIS\n pywharf <command> <command_flags>\n\nSUPPORTED COMMANDS\n server\n update_index\n github.init_pkg_repo\n github.gen_gh_pages\n```\n\n### Run the server\n\nTo run the server, use the command `pywharf server`.\n\n```txt\nSYNOPSIS\n pywharf server ROOT <flags>\n\nPOSITIONAL ARGUMENTS\n ROOT (str):\n Path to the root folder. This folder is for logging,\n file-based lock and any other file I/O.\n\nFLAGS\n --config (Optional[str]):\n Path to the package repository config (TOML),\n or the file content if --config_or_admin_secret_can_be_text is set.\n Default to None.\n --admin_secret (Optional[str]):\n Path to the admin secrets config (TOML) with read/write permission.\n or the file content if --config_or_admin_secret_can_be_text is set.\n This field is required for local index synchronization.\n Default to None.\n --config_or_admin_secret_can_be_text (Optional[bool]):\n Enable passing the file content to --config or --admin_secret.\n Default to False.\n --auth_read_expires (int):\n The expiration time (in seconds) for read authentication.\n Default to 3600.\n --auth_write_expires (int):\n The expiration time (in seconds) for write authentication.\n Default to 300.\n --extra_index_url (str):\n Extra index url for redirection in case package not found.\n If set to empty string explicitly redirection will be suppressed.\n Default to 'https://pypi.org/simple/'.\n --debug (bool):\n Enable debug mode.\n Default to False.\n --host (str):\n The interface to bind to.\n Default to '0.0.0.0'.\n --port (int):\n The port to bind to.\n Default to 8888.\n **waitress_options (Dict[str, Any]):\n Optional arguments that `waitress.serve` takes.\n Details in https://docs.pylonsproject.org/projects/waitress/en/stable/arguments.html.\n Default to {}.\n```\n\nIn short, the configuration passed to `--config` defines mappings from `pkg_repo_name` to backend-specific settings. In other words, a single server instance can be configured to connect to multiple backends.\n\nExampe of the configuration file passed to `--config`:\n\n```toml\n[pywharf-pkg-repo]\ntype = \"github\"\nowner = \"pywharf\"\nrepo = \"pywharf-pkg-repo\"\n\n[local-file-system]\ntype = \"file_system\"\nread_secret = \"foo\"\nwrite_secret = \"bar\"\n```\n\nExampe of the admin secret file passed to `--admin_secret`:\n\n```toml\n[pywharf-pkg-repo]\ntype = \"github\"\nraw = \"<personal-access-token>\"\n\n[local-file-system]\ntype = \"file_system\"\nraw = \"foo\"\n```\n\nExample run:\n\n```shell\ndocker run --rm \\\n -v /path/to/root:/pywharf-root \\\n -v /path/to/config.toml:/config.toml \\\n -v /path/to/admin_secret.toml:/admin_secret.toml \\\n -p 8888:8888 \\\n pywharf/pywharf:0.2.0 \\\n server \\\n /pywharf-root \\\n --config=/config.toml \\\n --admin_secret=/admin_secret.toml\n```\n\n### Server API\n\n#### Authentication in shell\n\nUser must provide the `pkg_repo_name` and their secret in most of the API calls so that the server can find which backend to operate and determine whether the operation is permitted or not. The `pkg_repo_name` and the secret should be provided in [basic access authentication](https://en.wikipedia.org/wiki/Basic_access_authentication).\n\nSome package management tools will handle the authentication behind the screen, for example,\n\n* Twine: to set the environment variables `TWINE_USERNAME` and `TWINE_PASSWORD`. [ref](https://github.com/pypa/twine#environment-variables)\n* Poetry: [Configuring credentials](https://python-poetry.org/docs/repositories/#configuring-credentials).\n\nSome will not, for example,\n\n* Pip: you need to prepend `<pkg_repo_name>:<secret>@` to the hostname in the URL manually like this `https://[username[:password]@]pypi.company.com/simple`. [ref](https://pip.pypa.io/en/stable/user_guide/#basic-authentication-credentials)\n\n#### Authentication in browser\n\nYou need to visit `/login` page to submit `pkg_repo_name` and the secret, since most of the browsers today don't support prepending `<username>:<password>@` to the hostname in the URL. The `pkg_repo_name` and the secret will be stored in the session cookies. To reset, visit `/logout` .\n\nExample: `http://localhost:8888/login/`\n\n<div align=\"center\"><img width=\"600\" alt=\"Screen Shot 2020-03-25 at 12 36 03 PM\" src=\"https://user-images.githubusercontent.com/5213906/77502233-40871b00-6e95-11ea-8ac9-4844d7067ed2.png\"></div>\n\n\n#### PEP-503, Legacy API\n\nThe server follows [PEP 503 -- Simple Repository API](https://www.python.org/dev/peps/pep-0503/) and [Legacy API](https://warehouse.pypa.io/api-reference/legacy/#upload-api) to define APIs for searching/downloading/uploading package:\n\n* `GET /simple/`: List all distributions.\n* `GET /simple/<distrib>/`: List all packages in a distribution.\n* `GET /simple/<distrib>/<filename>`: Download a package file.\n* `POST /simple/`: Upload a package file.\n\nIn a nutshell, you need to set the \"index url / repository url / ...\" to `http://<host>:<port>/simple/` for the package management tool.\n\n#### Server management\n\n##### `GET /index_mtime`\n\nGet the last index index synchronization timestamp.\n\n```shell\n$ curl http://debug:foo@localhost:8888/index_mtime/\n1584379892\n```\n\n##### `POST /initialize`\n\nSubmit configuration and (re-)initialize the server. User can change the package repository configuration on-the-fly with this API.\n\n```shell\n# POST the file content.\n$ curl \\\n -d \"config=${CONFIG}&admin_secret=${ADMIN_SECRET}\" \\\n -X POST \\\n http://localhost:8888/initialize/\n\n# Or, POST the file.\n$ curl \\\n -F 'config=@/path/to/config.toml' \\\n -F 'admin_secret=@/path/to/admin_secret.toml' \\\n http://localhost:8888/initialize/\n```\n\n### Update index\n\n<div align=\"center\"><img width=\"636\" alt=\"Screen Shot 2020-03-25 at 5 39 19 PM\" src=\"https://user-images.githubusercontent.com/5213906/77522697-9a043f80-6ebf-11ea-95e6-9a086db7af2e.png\"></div>\n\nIndex file is used to track all published packages in a specific time:\n\n* *Remote index file*: the index file sotred in the backend. By design, this file is only updated by a standalone `update index` service and will not be updated by the `pywharf` server.\n* *Local index file*: the index file synchronized from the remote index file by the `pywharf` server\n\nTo update the remote index file, use the command `pywharf update_index`:\n\n```txt\nSYNOPSIS\n pywharf update_index TYPE NAME <flags>\n\nPOSITIONAL ARGUMENTS\n TYPE (str):\n Backend type.\n NAME (str):\n Name of config.\n\nFLAGS\n --secret (Optional[str]):\n The secret with write permission.\n --secret_env (Optional[str]):\n Instead of passing the secret through --secret,\n the secret could be loaded from the environment variable.\n **pkg_repo_configs (Dict[str, Any]):\n Any other backend-specific configs are allowed.\n```\n\nBackend developer could setup an `update index` service by invoking `pywharf update_index` command.\n\n### Backend-specific commands\n\nThe backend registration mechanism will hook up the backend-specific commands to `pywharf`. As illustrated, commands `github.init_pkg_repo` and `github.gen_gh_pages` are registered by `github` backend.\n\n```shell\n$ pywharf --help\nSYNOPSIS\n pywharf <command> <command_flags>\n\nSUPPORTED COMMANDS\n server\n update_index\n github.init_pkg_repo\n github.gen_gh_pages\n```\n\n### Environment mode\n\nIf no argument is passed, `pywharf` will try to load the arguments from the environment variables. This mode would be helpful if passing argument in shell is not possible.\n\nThe format:\n\n- `PYWHARF_COMMAND`: to set `<command>`.\n- `PYWHARF_COMMAND_<FLAG>`: to set the flag of `<command>`.\n\n## Backends\n\n### GitHub\n\n#### Introduction\n\n`pywharf` will help you setup a new GitHub repository to host your package. You package will be published as repository release and secured by personal access token. Take https://github.com/pywharf/pywharf-pkg-repo and https://pywharf.github.io/pywharf-pkg-repo/ as an example.\n\n#### Configuration and secret\n\nPackage repository configuration of GitHub backend:\n\n- `type`: must set to `github`.\n- `owner`: repository owner.\n- `repo`: repository name.\n- `branch` (optional): the branch to store the remote index file. Default to `master`.\n- `index_filename` (optional): the name of remote index file. Default to `index.toml`.\n- `max_file_bytes` (optional): limit the maximum size (in bytes) of package. Default to `2147483647` since *each file included in a release must be under 2 GB*, [as restricted by GitHub](https://help.github.com/en/github/administering-a-repository/about-releases#storage-and-bandwidth-quotas) .\n- `sync_index_interval` (optional): the sleep time interval (in seconds) before taking the next local index file synchronization. Default to `60`.\n\nExample configuration of https://github.com/pywharf/pywharf-pkg-repo:\n\n```toml\n[pywharf-pkg-repo]\ntype = \"github\"\nowner = \"pywharf\"\nrepo = \"pywharf-pkg-repo\"\n```\n\nThe GitHub backend accepts [personal access token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) as the repository secret. The `pywharf` server calls GitHub API with PAT to operate on packages. You can authorize user with read or write permission based on [team role](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization).\n\n#### Initialize the repository\n\nTo initialize a GitHub repository as the storage backend, run the command `github.init_pkg_repo`:\n\n```shell\ndocker run --rm pywharf/pywharf:0.2.0 \\\n github.init_pkg_repo \\\n --name pywharf-pkg-repo \\\n --owner pywharf \\\n --repo pywharf-pkg-repo \\\n --token <personal-access-token>\n```\n\nThis will:\n\n- Create a new repository `<owner>/<repo>`.\n- Setup the GitHub workflow to update the remote index file if new package is published.\n- Print the configuration for you.\n\nIf you want to host the index in GitHub page, like https://pywharf.github.io/pywharf-pkg-repo/, add `--enable_gh_pages` to command execution.\n\n#### GitHub workflow integration\n\nTo use `pywharf` with GitHub workflow, take [thie main.yml](https://github.com/pywharf/pywharf/blob/master/.github/workflows/main.yml) as an example.\n\nFirstly, run the server as job service:\n\n```yaml\nservices:\n pywharf:\n image: pywharf/pywharf:0.2.0\n ports:\n - 8888:8888\n volumes:\n - pywharf-root:/pywharf-root\n env:\n PYWHARF_COMMAND: server\n PYWHARF_COMMAND_ROOT: /pywharf-root\n```\n\nSecondly, initialize the server with configuration and admin secret (Note: remember to [add the admin secret to your repository](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets) before using it):\n\n```yaml\nsteps:\n - name: Setup pywharf\n run: |\n curl \\\n -d \"config=${CONFIG}&admin_secret=${ADMIN_SECRET}\" \\\n -X POST \\\n http://localhost:8888/initialize/\n env:\n CONFIG: |\n [pywharf-pkg-repo]\n type = \"github\"\n owner = \"pywharf\"\n repo = \"pywharf-pkg-repo\"\n ADMIN_SECRET: |\n [pywharf-pkg-repo]\n type = \"github\"\n raw = \"${{ secrets.PYWHARF_PKG_REPO_TOKEN }}\"\n```\n\nAfterward, set `http://localhost:8888/simple/` as the repository url, and you are good to go.\n\n### File system\n\n#### Introduction\n\nYou can configure this backend to host the packages in the local file system.\n\n#### Configuration and secret\n\nPackage repository configuration of GitHub backend:\n\n- `type`: must set to `file_system`.\n- `read_secret`: defines the secret with read only permission.\n- `write_secret`: defines the secret with write permission.\n- `max_file_bytes` (optional): limit the maximum size (in bytes) of package. Default to `5368709119` (5 GB).\n- `sync_index_interval` (optional): the sleep time interval (in seconds) before taking the next local index file synchronization. Default to `60`.\n\nExample configuration:\n\n```toml\n[local-file-system]\ntype = \"file_system\"\nread_secret = \"foo\"\nwrite_secret = \"bar\"\n```\n\nTo use the API, user must provide either `read_secret` or `write_secret`.\n\n#### Initialize the package repository\n\nA folder will be created automatically to store the packages, with the path `<ROOT>/cache/<pkg_repo_name>/storage`.\n\n"
keywords = "private,pypi,packaging,dependency"
classifiers = "License :: OSI Approved :: MIT License"
download_url = ""
comment = ""
md5_digest = "1734aafec31e2709656231512fbbefb4"
sha256_digest = "f58f41699610cbe16413de9c7c5bfa689caaadfd1186e09c6f52d47dac57702a"
blake2_256_digest = "96c2caf66eefb6425025a348c12b5a9d812d45bf13edc0c3587f2233f8e257fb"
project_urls = "Repository, https://github.com/pywharf/pywharf"
requires_dist = "pywharf-core (==0.2.0)"
requires_python = ">=3.7,<4.0"
description_content_type = "text/markdown"
":action" = "file_upload"
protocol_version = "1"
distrib = "pywharf"
sha256 = "f58f41699610cbe16413de9c7c5bfa689caaadfd1186e09c6f52d47dac57702a"
[[pkgs]]
type = "github"
distrib = "pywharf-github"
package = "pywharf_github-0.2.0-py3-none-any"
ext = "whl"
sha256 = "0a0a70dee99e1effe6053afdb3ee09c1f654c8e668428c1c430f942a0af35282"
url = "https://api.github.com/repos/pywharf/pywharf-pkg-repo/releases/assets/19059172"
[pkgs.meta]
name = "pywharf-github"
version = "0.2.0"
filetype = "bdist_wheel"
pyversion = "py3"
metadata_version = "2.1"
summary = ""
home_page = "https://github.com/pywharf/pywharf-github"
author = "huntzhan"
author_email = "[email protected]"
maintainer = ""
maintainer_email = ""
license = "MIT"
description = "# pywharf-github\n\nThe GitHub backend of https://github.com/pywharf/pywharf\n\n"
keywords = "private,pypi,github,packaging,dependency"
classifiers = "License :: OSI Approved :: MIT License"
download_url = ""
comment = ""
md5_digest = "11821d25ffdd77406e11ee414abf44f2"
sha256_digest = "0a0a70dee99e1effe6053afdb3ee09c1f654c8e668428c1c430f942a0af35282"
blake2_256_digest = "f9f8216d9fb084192cb13bf25a731803607834f2114d89faa2da9be1b010d027"
project_urls = "Repository, https://github.com/pywharf/pywharf-github"
requires_dist = "PyGithub (>=1.46,<2.0)"
requires_python = ">=3.7,<4.0"
description_content_type = "text/markdown"
":action" = "file_upload"
protocol_version = "1"
distrib = "pywharf-github"
sha256 = "0a0a70dee99e1effe6053afdb3ee09c1f654c8e668428c1c430f942a0af35282"
[[pkgs]]
type = "github"
distrib = "pywharf-core"
package = "pywharf_core-0.2.0-py3-none-any"
ext = "whl"
sha256 = "0f4944783a4bb6c44024eb6802ad2d646d346e3c63698a308ea35bc0bfb58368"
url = "https://api.github.com/repos/pywharf/pywharf-pkg-repo/releases/assets/19056668"
[pkgs.meta]
name = "pywharf-core"
version = "0.2.0"
filetype = "bdist_wheel"
pyversion = "py3"
metadata_version = "2.1"
summary = "A private PyPI server powered by flexible backends."
home_page = "https://github.com/pywharf/pywharf-core"
author = "huntzhan"
author_email = "[email protected]"
maintainer = ""
maintainer_email = ""
license = "MIT"
description = "# pywharf-core\n\nThe core of https://github.com/pywharf/pywharf\n\n"
keywords = "private,pypi,packaging,dependency"
classifiers = "License :: OSI Approved :: MIT License"
download_url = ""
comment = ""
md5_digest = "3fe943e3887b980195c44fe26918c828"
sha256_digest = "0f4944783a4bb6c44024eb6802ad2d646d346e3c63698a308ea35bc0bfb58368"
blake2_256_digest = "d7533a8a47ae7b7137e547cfd36385e0e9c0a269585597e2187a33237128576a"
project_urls = "Repository, https://github.com/pywharf/pywharf-core"
requires_dist = "Jinja2 (>=2.11.1,<3.0.0)"
requires_python = ">=3.7,<4.0"
description_content_type = "text/markdown"
":action" = "file_upload"
protocol_version = "1"
distrib = "pywharf-core"
sha256 = "0f4944783a4bb6c44024eb6802ad2d646d346e3c63698a308ea35bc0bfb58368"
[[pkgs]]
type = "github"
distrib = "private-pypi"
package = "private_pypi-0.2.0-py3-none-any"
ext = "whl"
sha256 = "8bd77104467a6afaadae2d5d7616c8fcf0452085667b674f11b83aa1dc12cdac"
url = "https://api.github.com/repos/pywharf/pywharf-pkg-repo/releases/assets/18996761"
[pkgs.meta]
name = "private-pypi"
version = "0.2.0"
filetype = "bdist_wheel"
pyversion = "py3"
metadata_version = "2.1"
summary = "A private PyPI server powered by flexible backends."
home_page = "https://github.com/private-pypi/private-pypi"
author = "huntzhan"
author_email = "[email protected]"
maintainer = ""
maintainer_email = ""
license = "MIT"
description = "<div align=\"center\">\n\n![logo-large 72ad8bf1](https://user-images.githubusercontent.com/5213906/77421237-6d402180-6e06-11ea-89c1-915cd747660a.png)\n\n# Private PyPI\n\n**The private PyPI server powered by flexible backends.**\n\n[![build-and-push](https://github.com/private-pypi/private-pypi/workflows/build-and-push/badge.svg)](https://github.com/private-pypi/private-pypi/actions?query=workflow%3Abuild-and-push)\n[![license](https://img.shields.io/github/license/private-pypi/private-pypi)](https://github.com/private-pypi/private-pypi/blob/master/LICENSE)\n\n</div>\n\n* [Private PyPI](#Private-PyPI)\n\t* [What is it?](#What-is-it?)\n\t* [Design](#Design)\n\t* [Usage](#Usage)\n\t\t* [Install from PyPI](#Install-from-PyPI)\n\t\t* [Using the docker image (recommended)](#Using-the-docker-image-(recommended))\n\t\t* [Run the server](#Run-the-server)\n\t\t* [Server API](#Server-API)\n\t\t* [Update index](#Update-index)\n\t\t* [Backend-specific commands](#Backend-specific-commands)\n\t\t* [Environment mode](#Environment-mode)\n\t* [Backends](#Backends)\n\t\t* [GitHub](#GitHub)\n\t\t* [File system](#File-system)\n\n------\n\n## What is it?\n\n`private-pypi` allows you to deploy a PyPI server privately and keep your artifacts safe by leveraging the power (confidentiality, integrity and availability) of your storage backend. The backend mechanism is designed to be flexible so that the developer could support a new storage backend at a low cost.\n\nSupported backends:\n\n- GitHub. (Yes, you can now host your Python package in GitHub by using `private-pypi`. )\n- File system.\n- ... (*Upcoming*)\n\n## Design\n\n<div align=\"center\"><img width=\"766\" alt=\"Screen Shot 2020-03-24 at 8 19 12 PM\" src=\"https://user-images.githubusercontent.com/5213906/77424853-c14e0480-6e0c-11ea-9a7f-879a68ada0a0.png\"></div>\n\nThe `private-pypi` server serves as an abstraction layer between Python package management tools (pip/poetry/twine) and the storage backends:\n\n* Package management tools communicate with `private-pypi` server, following [PEP 503 -- Simple Repository API](https://www.python.org/dev/peps/pep-0503/) for searching/downloading package, and [Legacy API](https://warehouse.pypa.io/api-reference/legacy/#upload-api) for uploading package.\n* `private-pypi` server then performs file search/download/upload operations with some specific storage backend.\n\n## Usage\n\n### Install from PyPI\n\n```shell\npip install private-pypi==0.2.0\n```\n\nThis should bring the execuable `private_pypi` to your environment.\n\n```shell\n$ private_pypi --help\nSYNOPSIS\n private_pypi <command> <command_flags>\n\nSUPPORTED COMMANDS\n server\n update_index\n github.init_pkg_repo\n github.gen_gh_pages\n```\n\n### Using the docker image (recommended)\n\nDocker image: `privatepypi/private-pypi:0.2.0`. The image tag is the same as the package version in PyPI.\n\n```shell\n$ docker run --rm privatepypi/private-pypi:0.2.0 --help\nSYNOPSIS\n private_pypi <command> <command_flags>\n\nSUPPORTED COMMANDS\n server\n update_index\n github.init_pkg_repo\n github.gen_gh_pages\n```\n\n### Run the server\n\nTo run the server, use the command `private_pypi server`.\n\n```txt\nSYNOPSIS\n private_pypi server ROOT <flags>\n\nPOSITIONAL ARGUMENTS\n ROOT (str):\n Path to the root folder. This folder is for logging,\n file-based lock and any other file I/O.\n\nFLAGS\n --config (Optional[str]):\n Path to the package repository config (TOML),\n or the file content if --config_or_admin_secret_can_be_text is set.\n Default to None.\n --admin_secret (Optional[str]):\n Path to the admin secrets config (TOML) with read/write permission.\n or the file content if --config_or_admin_secret_can_be_text is set.\n This field is required for local index synchronization.\n Default to None.\n --config_or_admin_secret_can_be_text (Optional[bool]):\n Enable passing the file content to --config or --admin_secret.\n Default to False.\n --auth_read_expires (int):\n The expiration time (in seconds) for read authentication.\n Default to 3600.\n --auth_write_expires (int):\n The expiration time (in seconds) for write authentication.\n Default to 300.\n --extra_index_url (str):\n Extra index url for redirection in case package not found.\n If set to empty string explicitly redirection will be suppressed.\n Default to 'https://pypi.org/simple/'.\n --debug (bool):\n Enable debug mode.\n Default to False.\n --host (str):\n The interface to bind to.\n Default to '0.0.0.0'.\n --port (int):\n The port to bind to.\n Default to 8888.\n **waitress_options (Dict[str, Any]):\n Optional arguments that `waitress.serve` takes.\n Details in https://docs.pylonsproject.org/projects/waitress/en/stable/arguments.html.\n Default to {}.\n```\n\nIn short, the configuration passed to `--config` defines mappings from `pkg_repo_name` to backend-specific settings. In other words, a single server instance can be configured to connect to multiple backends.\n\nExampe of the configuration file passed to `--config`:\n\n```toml\n[private-pypi-pkg-repo]\ntype = \"github\"\nowner = \"private-pypi\"\nrepo = \"private-pypi-pkg-repo\"\n\n[local-file-system]\ntype = \"file_system\"\nread_secret = \"foo\"\nwrite_secret = \"bar\"\n```\n\nExampe of the admin secret file passed to `--admin_secret`:\n\n```toml\n[private-pypi-pkg-repo]\ntype = \"github\"\nraw = \"<personal-access-token>\"\n\n[local-file-system]\ntype = \"file_system\"\nraw = \"foo\"\n```\n\nExample run:\n\n```shell\ndocker run --rm \\\n -v /path/to/root:/private-pypi-root \\\n -v /path/to/config.toml:/config.toml \\\n -v /path/to/admin_secret.toml:/admin_secret.toml \\\n -p 8888:8888 \\\n privatepypi/private-pypi:0.2.0 \\\n server \\\n /private-pypi-root \\\n --config=/config.toml \\\n --admin_secret=/admin_secret.toml\n```\n\n### Server API\n\n#### Authentication in shell\n\nUser must provide the `pkg_repo_name` and their secret in most of the API calls so that the server can find which backend to operate and determine whether the operation is permitted or not. The `pkg_repo_name` and the secret should be provided in [basic access authentication](https://en.wikipedia.org/wiki/Basic_access_authentication).\n\nSome package management tools will handle the authentication behind the screen, for example,\n\n* Twine: to set the environment variables `TWINE_USERNAME` and `TWINE_PASSWORD`. [ref](https://github.com/pypa/twine#environment-variables)\n* Poetry: [Configuring credentials](https://python-poetry.org/docs/repositories/#configuring-credentials).\n\nSome will not, for example,\n\n* Pip: you need to prepend `<pkg_repo_name>:<secret>@` to the hostname in the URL manually like this `https://[username[:password]@]pypi.company.com/simple`. [ref](https://pip.pypa.io/en/stable/user_guide/#basic-authentication-credentials)\n\n#### Authentication in browser\n\nYou need to visit `/login` page to submit `pkg_repo_name` and the secret, since most of the browsers today don't support prepending `<username>:<password>@` to the hostname in the URL. The `pkg_repo_name` and the secret will be stored in the session cookies. To reset, visit `/logout` .\n\nExample: `http://localhost:8888/login/`\n\n<div align=\"center\"><img width=\"600\" alt=\"Screen Shot 2020-03-25 at 12 36 03 PM\" src=\"https://user-images.githubusercontent.com/5213906/77502233-40871b00-6e95-11ea-8ac9-4844d7067ed2.png\"></div>\n\n\n#### PEP-503, Legacy API\n\nThe server follows [PEP 503 -- Simple Repository API](https://www.python.org/dev/peps/pep-0503/) and [Legacy API](https://warehouse.pypa.io/api-reference/legacy/#upload-api) to define APIs for searching/downloading/uploading package:\n\n* `GET /simple/`: List all distributions.\n* `GET /simple/<distrib>/`: List all packages in a distribution.\n* `GET /simple/<distrib>/<filename>`: Download a package file.\n* `POST /simple/`: Upload a package file.\n\nIn a nutshell, you need to set the \"index url / repository url / ...\" to `http://<host>:<port>/simple/` for the package management tool.\n\n#### Private PyPI server management\n\n##### `GET /index_mtime`\n\nGet the last index index synchronization timestamp.\n\n```shell\n$ curl http://debug:foo@localhost:8888/index_mtime/\n1584379892\n```\n\n##### `POST /initialize`\n\nSubmit configuration and (re-)initialize the server. User can change the package repository configuration on-the-fly with this API.\n\n```shell\n# POST the file content.\n$ curl \\\n -d \"config=${CONFIG}&admin_secret=${ADMIN_SECRET}\" \\\n -X POST \\\n http://localhost:8888/initialize/\n\n# Or, POST the file.\n$ curl \\\n -F 'config=@/path/to/config.toml' \\\n -F 'admin_secret=@/path/to/admin_secret.toml' \\\n http://localhost:8888/initialize/\n```\n\n### Update index\n\n<div align=\"center\"><img width=\"636\" alt=\"Screen Shot 2020-03-25 at 5 39 19 PM\" src=\"https://user-images.githubusercontent.com/5213906/77522697-9a043f80-6ebf-11ea-95e6-9a086db7af2e.png\"></div>\n\nIndex file is used to track all published packages in a specific time:\n\n* *Remote index file*: the index file sotred in the backend. By design, this file is only updated by a standalone `update index` service and will not be updated by the `private-pypi` server.\n* *Local index file*: the index file synchronized from the remote index file by the `private-pypi` server\n\nTo update the remote index file, use the command `private_pypi update_index`:\n\n```txt\nSYNOPSIS\n private_pypi update_index TYPE NAME <flags>\n\nPOSITIONAL ARGUMENTS\n TYPE (str):\n Backend type.\n NAME (str):\n Name of config.\n\nFLAGS\n --secret (Optional[str]):\n The secret with write permission.\n --secret_env (Optional[str]):\n Instead of passing the secret through --secret,\n the secret could be loaded from the environment variable.\n **pkg_repo_configs (Dict[str, Any]):\n Any other backend-specific configs are allowed.\n```\n\nBackend developer could setup an `update index` service by invoking `private_pypi update_index` command.\n\n### Backend-specific commands\n\nThe backend registration mechanism will hook up the backend-specific commands to `private_pypi`. As illustrated, commands `github.init_pkg_repo` and `github.gen_gh_pages` are registered by `github` backend.\n\n```shell\n$ private_pypi --help\nSYNOPSIS\n private_pypi <command> <command_flags>\n\nSUPPORTED COMMANDS\n server\n update_index\n github.init_pkg_repo\n github.gen_gh_pages\n```\n\n### Environment mode\n\nIf no argument is passed, `private_pypi` will try to load the arguments from the environment variables. This mode would be helpful if passing argument in shell is not possible.\n\nThe format:\n\n- `PRIVATE_PYPI_COMMAND`: to set `<command>`.\n- `PRIVATE_PYPI_COMMAND_<FLAG>`: to set the flag of `<command>`.\n\n## Backends\n\n### GitHub\n\n#### Introduction\n\n`private-pypi` will help you setup a new GitHub repository to host your package. You package will be published as repository release and secured by personal access token. Take https://github.com/private-pypi/private-pypi-pkg-repo and https://private-pypi.github.io/private-pypi-pkg-repo/ as an example.\n\n#### Configuration and secret\n\nPackage repository configuration of GitHub backend:\n\n- `type`: must set to `github`.\n- `owner`: repository owner.\n- `repo`: repository name.\n- `branch` (optional): the branch to store the remote index file. Default to `master`.\n- `index_filename` (optional): the name of remote index file. Default to `index.toml`.\n- `max_file_bytes` (optional): limit the maximum size (in bytes) of package. Default to `2147483647` since *each file included in a release must be under 2 GB*, [as restricted by GitHub](https://help.github.com/en/github/administering-a-repository/about-releases#storage-and-bandwidth-quotas) .\n- `sync_index_interval` (optional): the sleep time interval (in seconds) before taking the next local index file synchronization. Default to `60`.\n\nExample configuration of https://github.com/private-pypi/private-pypi-pkg-repo:\n\n```toml\n[private-pypi-pkg-repo]\ntype = \"github\"\nowner = \"private-pypi\"\nrepo = \"private-pypi-pkg-repo\"\n```\n\nThe GitHub backend accepts [personal access token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) as the repository secret. The `private-pypi` server calls GitHub API with PAT to operate on packages. You can authorize user with read or write permission based on [team role](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization).\n\n#### Initialize the repository\n\nTo initialize a GitHub repository as the storage backend, run the command `github.init_pkg_repo`:\n\n```shell\ndocker run --rm privatepypi/private-pypi:0.2.0 \\\n github.init_pkg_repo \\\n --name private-pypi-pkg-repo \\\n --owner private-pypi \\\n --repo private-pypi-pkg-repo \\\n --token <personal-access-token>\n```\n\nThis will:\n\n- Create a new repository `<owner>/<repo>`.\n- Setup the GitHub workflow to update the remote index file if new package is published.\n- Print the configuration for you.\n\nIf you want to host the index in GitHub page, like https://private-pypi.github.io/private-pypi-pkg-repo/, add `--enable_gh_pages` to command execution.\n\n#### GitHub workflow integration\n\nTo use `private-pypi` with GitHub workflow, take [thie main.yml](https://github.com/private-pypi/private-pypi/blob/master/.github/workflows/main.yml) as an example.\n\nFirstly, run the server as job service:\n\n```yaml\nservices:\n private-pypi:\n image: privatepypi/private-pypi:0.2.0\n ports:\n - 8888:8888\n volumes:\n - private-pypi-root:/private-pypi-root\n env:\n PRIVATE_PYPI_COMMAND: server\n PRIVATE_PYPI_COMMAND_ROOT: /private-pypi-root\n```\n\nSecondly, initialize the server with configuration and admin secret (Note: remember to [add the admin secret to your repository](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets) before using it):\n\n```yaml\nsteps:\n - name: Setup private-pypi\n run: |\n curl \\\n -d \"config=${CONFIG}&admin_secret=${ADMIN_SECRET}\" \\\n -X POST \\\n http://localhost:8888/initialize/\n env:\n CONFIG: |\n [private-pypi-pkg-repo]\n type = \"github\"\n owner = \"private-pypi\"\n repo = \"private-pypi-pkg-repo\"\n ADMIN_SECRET: |\n [private-pypi-pkg-repo]\n type = \"github\"\n raw = \"${{ secrets.PRIVATE_PYPI_PKG_REPO_TOKEN }}\"\n```\n\nAfterward, set `http://localhost:8888/simple/` as the repository url, and you are good to go.\n\n### File system\n\n#### Introduction\n\nYou can configure this backend to host the packages in the local file system.\n\n#### Configuration and secret\n\nPackage repository configuration of GitHub backend:\n\n- `type`: must set to `file_system`.\n- `read_secret`: defines the secret with read only permission.\n- `write_secret`: defines the secret with write permission.\n- `max_file_bytes` (optional): limit the maximum size (in bytes) of package. Default to `5368709119` (5 GB).\n- `sync_index_interval` (optional): the sleep time interval (in seconds) before taking the next local index file synchronization. Default to `60`.\n\nExample configuration:\n\n```toml\n[local-file-system]\ntype = \"file_system\"\nread_secret = \"foo\"\nwrite_secret = \"bar\"\n```\n\nTo use the API, user must provide either `read_secret` or `write_secret`.\n\n#### Initialize the package repository\n\nA folder will be created automatically to store the packages, with the path `<ROOT>/cache/<pkg_repo_name>/storage`.\n\n"
keywords = "private,pypi,packaging,dependency"
classifiers = "License :: OSI Approved :: MIT License"
download_url = ""
comment = ""
md5_digest = "cb6d5b98d47b301978a9a85bcf036b03"
sha256_digest = "8bd77104467a6afaadae2d5d7616c8fcf0452085667b674f11b83aa1dc12cdac"
blake2_256_digest = "1ee5909501d13c9d19796dfcc028ac9fcc3e4be4d769ecb120a15f1aca369c75"
project_urls = "Repository, https://github.com/private-pypi/private-pypi"
requires_dist = "private-pypi-core (==0.2.0)"
requires_python = ">=3.7,<4.0"
description_content_type = "text/markdown"
":action" = "file_upload"
protocol_version = "1"
distrib = "private-pypi"
sha256 = "8bd77104467a6afaadae2d5d7616c8fcf0452085667b674f11b83aa1dc12cdac"
[[pkgs]]
type = "github"
distrib = "private-pypi-github"
package = "private_pypi_github-0.2.0-py3-none-any"
ext = "whl"
sha256 = "f98ee41590b06c57b379efa08a329e27d29cc7b8997d84697008a5abaa734364"
url = "https://api.github.com/repos/pywharf/pywharf-pkg-repo/releases/assets/18996656"
[pkgs.meta]
name = "private-pypi-github"
version = "0.2.0"
filetype = "bdist_wheel"
pyversion = "py3"
metadata_version = "2.1"
summary = ""
home_page = "https://github.com/private-pypi/private-pypi-github"
author = "huntzhan"
author_email = "[email protected]"
maintainer = ""
maintainer_email = ""
license = "MIT"
description = "# private-pypi-github\n\nThe GitHub backend of https://github.com/private-pypi/private-pypi\n\n"
keywords = "private,pypi,github,packaging,dependency"
classifiers = "License :: OSI Approved :: MIT License"
download_url = ""
comment = ""
md5_digest = "7f67a60c211a3c3b23604fc2893be267"
sha256_digest = "f98ee41590b06c57b379efa08a329e27d29cc7b8997d84697008a5abaa734364"
blake2_256_digest = "50ab11a3565176b812cfe5bddf11fff23b7741913d05e94422bde996076f3cea"
project_urls = "Repository, https://github.com/private-pypi/private-pypi-github"
requires_dist = "PyGithub (>=1.46,<2.0)"
requires_python = ">=3.7,<4.0"
description_content_type = "text/markdown"
":action" = "file_upload"
protocol_version = "1"
distrib = "private-pypi-github"
sha256 = "f98ee41590b06c57b379efa08a329e27d29cc7b8997d84697008a5abaa734364"
[[pkgs]]
type = "github"
distrib = "private-pypi-core"
package = "private_pypi_core-0.2.0-py3-none-any"
ext = "whl"
sha256 = "399664abae2c4c4e29667c96212d5390d6a1e5276e89195ce2bc15df67637c12"
url = "https://api.github.com/repos/pywharf/pywharf-pkg-repo/releases/assets/18996010"
[pkgs.meta]
name = "private-pypi-core"
version = "0.2.0"
filetype = "bdist_wheel"
pyversion = "py3"
metadata_version = "2.1"
summary = "A private PyPI server powered by flexible backends."
home_page = "https://github.com/private-pypi/private-pypi-core"
author = "huntzhan"
author_email = "[email protected]"
maintainer = ""
maintainer_email = ""
license = "MIT"
description = "# private-pypi-core\n\nThe core of https://github.com/private-pypi/private-pypi\n\n"
keywords = "private,pypi,packaging,dependency"
classifiers = "License :: OSI Approved :: MIT License"
download_url = ""
comment = ""
md5_digest = "0a43fa39b2bebdbf0f652e46b1674394"
sha256_digest = "399664abae2c4c4e29667c96212d5390d6a1e5276e89195ce2bc15df67637c12"
blake2_256_digest = "174ec8664d63fc3ce35099bb8b0c832c341db534be44a0fb72c3c80dfa28f2ad"
project_urls = "Repository, https://github.com/private-pypi/private-pypi-core"
requires_dist = "Jinja2 (>=2.11.1,<3.0.0)"
requires_python = ">=3.7,<4.0"
description_content_type = "text/markdown"
":action" = "file_upload"
protocol_version = "1"
distrib = "private-pypi-core"
sha256 = "399664abae2c4c4e29667c96212d5390d6a1e5276e89195ce2bc15df67637c12"
[[pkgs]]
type = "github"
distrib = "private-pypi"
package = "private_pypi-0.1.0a17-py3-none-any"
ext = "whl"
sha256 = "e38f0acc3309a6800953ea6cc84489874ee12c0202202b8b9aa44d7233fc243e"
url = "https://api.github.com/repos/pywharf/pywharf-pkg-repo/releases/assets/18926985"
[pkgs.meta]
name = "private-pypi"
version = "0.1.0a17"
filetype = "bdist_wheel"
pyversion = "py3"
metadata_version = "2.1"
summary = "A private PyPI server powered by flexible backends."
home_page = "https://github.com/private-pypi/private-pypi"
author = "huntzhan"
author_email = "[email protected]"
maintainer = ""
maintainer_email = ""
license = "MIT"
description = "# TODO\n"
keywords = "private,pypi,packaging,dependency"
classifiers = "License :: OSI Approved :: MIT License"
download_url = ""
comment = ""
md5_digest = "84553de935c407333e0884eb30816f1f"
sha256_digest = "e38f0acc3309a6800953ea6cc84489874ee12c0202202b8b9aa44d7233fc243e"
blake2_256_digest = "de1a66abbb1544a7c13dbeaaa85b0bbbd1cb453a7d2d331e20f42459d1e6fa2c"
project_urls = "Repository, https://github.com/private-pypi/private-pypi"
requires_dist = "private-pypi-core (==0.1.3a16)"
requires_python = ">=3.7,<4.0"
description_content_type = "text/markdown"
":action" = "file_upload"
protocol_version = "1"
distrib = "private-pypi"
sha256 = "e38f0acc3309a6800953ea6cc84489874ee12c0202202b8b9aa44d7233fc243e"
[[pkgs]]
type = "github"
distrib = "private-pypi"
package = "private_pypi-0.1.0a16-py3-none-any"
ext = "whl"
sha256 = "75a845b819c6980e34b3e468d1d7f7d00fc04bb9e573324fef8e87f9ed8b4bc5"
url = "https://api.github.com/repos/pywharf/pywharf-pkg-repo/releases/assets/18926362"
[pkgs.meta]
name = "private-pypi"
version = "0.1.0a16"
filetype = "bdist_wheel"
pyversion = "py3"
metadata_version = "2.1"
summary = "A private PyPI server powered by flexible backends."
home_page = "https://github.com/private-pypi/private-pypi"
author = "huntzhan"
author_email = "[email protected]"
maintainer = ""
maintainer_email = ""
license = "MIT"
description = "# TODO\n"
keywords = "private,pypi,packaging,dependency"
classifiers = "License :: OSI Approved :: MIT License"
download_url = ""
comment = ""
md5_digest = "4171794e7e7bd7763bf621f7ae0d9dd2"
sha256_digest = "75a845b819c6980e34b3e468d1d7f7d00fc04bb9e573324fef8e87f9ed8b4bc5"
blake2_256_digest = "34f11223bfcadde42b35dd7c69aade8f8a1fe3f421c4c3e5c4584d1e7cf2d7c6"
project_urls = "Repository, https://github.com/private-pypi/private-pypi"
requires_dist = "private-pypi-core (==0.1.3a16)"
requires_python = ">=3.7,<4.0"
description_content_type = "text/markdown"
":action" = "file_upload"
protocol_version = "1"
distrib = "private-pypi"
sha256 = "75a845b819c6980e34b3e468d1d7f7d00fc04bb9e573324fef8e87f9ed8b4bc5"
[[pkgs]]
type = "github"
distrib = "private-pypi-github"
package = "private_pypi_github-0.1.1a24-py3-none-any"
ext = "whl"
sha256 = "5f7c15ec0744cd22a1ca59694353f11d533883745cffdef91d59dee96c67ecb5"
url = "https://api.github.com/repos/pywharf/pywharf-pkg-repo/releases/assets/18920779"
[pkgs.meta]
name = "private-pypi-github"
version = "0.1.1a24"
filetype = "bdist_wheel"
pyversion = "py3"
metadata_version = "2.1"
summary = ""
home_page = "https://github.com/private-pypi/private-pypi-github"
author = "huntzhan"
author_email = "[email protected]"
maintainer = ""
maintainer_email = ""
license = "MIT"
description = "# todo\n"
keywords = "private,pypi,github,packaging,dependency"
classifiers = "License :: OSI Approved :: MIT License"
download_url = ""
comment = ""
md5_digest = "c2bb8f18f0268f228cd3bf15d4c94464"
sha256_digest = "5f7c15ec0744cd22a1ca59694353f11d533883745cffdef91d59dee96c67ecb5"
blake2_256_digest = "70d1fb8fd74ceda282f18f3670d407dfb07d82b82d6e53d2af3a066224b8fae7"
project_urls = "Repository, https://github.com/private-pypi/private-pypi-github"
requires_dist = "PyGithub (>=1.46,<2.0)"
requires_python = ">=3.7,<4.0"
description_content_type = "text/markdown"
":action" = "file_upload"
protocol_version = "1"
distrib = "private-pypi-github"
sha256 = "5f7c15ec0744cd22a1ca59694353f11d533883745cffdef91d59dee96c67ecb5"
[[pkgs]]
type = "github"
distrib = "private-pypi-core"
package = "private_pypi_core-0.1.3a16-py3-none-any"
ext = "whl"
sha256 = "2bc13489c48c3d7c86d69eb8f34bf2d9d40d770e8dac6a146793000f4f5fa7ae"
url = "https://api.github.com/repos/pywharf/pywharf-pkg-repo/releases/assets/18920436"
[pkgs.meta]
name = "private-pypi-core"
version = "0.1.3a16"
filetype = "bdist_wheel"
pyversion = "py3"
metadata_version = "2.1"
summary = "A private PyPI server powered by flexible backends."
home_page = "https://github.com/private-pypi/private-pypi-core"
author = "huntzhan"
author_email = "[email protected]"
maintainer = ""
maintainer_email = ""
license = "MIT"
description = "# private-pypi-core\n\n## CLI\n\n`private_pypi_server`:\n\n```txt\nRun the private-pypi server.\n\nSYNOPSIS\n private_pypi_server ROOT <flags>\n\nPOSITIONAL ARGUMENTS\n ROOT (str):\n Path to the root folder.\n\nFLAGS\n --config (Optional[str]):\n Path to the package repository config,\n or the file content if --config_or_admin_secret_can_be_text is set.\n Defaults to None.\n --admin_secret (Optional[str]):\n Path to the admin secrets config with read/write permission.\n or the file content if --config_or_admin_secret_can_be_text is set.\n This field is required for local index synchronization.\n Defaults to None.\n --config_or_admin_secret_can_be_text (Optional[bool]):\n Enable passing the file content to --config or --admin_secret.\n Defaults to False.\n --auth_read_expires (int):\n The expiration time (in seconds) for read authentication.\n Defaults to 3600.\n --auth_write_expires (int):\n The expiration time (in seconds) for write authentication.\n Defaults to 300.\n --extra_index_url (str):\n Extra index url for redirection in case package not found.\n If set to empty string explicitly redirection will be suppressed.\n Defaults to 'https://pypi.org/simple/'.\n --debug (bool):\n Enable debug mode.\n Defaults to False.\n --host (str):\n The interface to bind to.\n Defaults to '0.0.0.0'.\n --port (int):\n The port to bind to.\n Defaults to 8888.\n **waitress_options (Dict[str, Any]):\n Optional arguments that `waitress.serve` takes.\n Details in https://docs.pylonsproject.org/projects/waitress/en/stable/arguments.html.\n Defaults to {}.\n```\n\n"
keywords = "private,pypi,packaging,dependency"
classifiers = "License :: OSI Approved :: MIT License"
download_url = ""
comment = ""
md5_digest = "9b1bd1e01b87972fc621c24f15a152aa"
sha256_digest = "2bc13489c48c3d7c86d69eb8f34bf2d9d40d770e8dac6a146793000f4f5fa7ae"
blake2_256_digest = "b30230f50cbc159cad4a5917015703a42584e48677a49da0b1b1a09bd29ca532"
project_urls = "Repository, https://github.com/private-pypi/private-pypi-core"
requires_dist = "Jinja2 (>=2.11.1,<3.0.0)"
requires_python = ">=3.7,<4.0"
description_content_type = "text/markdown"
":action" = "file_upload"
protocol_version = "1"
distrib = "private-pypi-core"
sha256 = "2bc13489c48c3d7c86d69eb8f34bf2d9d40d770e8dac6a146793000f4f5fa7ae"
[[pkgs]]
type = "github"
distrib = "private-pypi"
package = "private_pypi-0.1.0a15-py3-none-any"
ext = "whl"
sha256 = "c3b9fc7ed0c6cbdb0fe4635c9755fc80c42d6ba584cd762ab0be4688a8cdd7ae"
url = "https://api.github.com/repos/pywharf/pywharf-pkg-repo/releases/assets/18905167"
[pkgs.meta]
name = "private-pypi"
version = "0.1.0a15"
filetype = "bdist_wheel"
pyversion = "py3"
metadata_version = "2.1"
summary = "A private PyPI server powered by flexible backends."
home_page = "https://github.com/private-pypi/private-pypi"
author = "huntzhan"
author_email = "[email protected]"
maintainer = ""
maintainer_email = ""
license = "MIT"
description = "# TODO\n"
keywords = "private,pypi,packaging,dependency"
classifiers = "License :: OSI Approved :: MIT License"
download_url = ""
comment = ""
md5_digest = "0cdb0d4148919b229892a6e31ba8252e"
sha256_digest = "c3b9fc7ed0c6cbdb0fe4635c9755fc80c42d6ba584cd762ab0be4688a8cdd7ae"
blake2_256_digest = "c6d999e074b1877af4a2de61642fd11c298656442216d19dee9c0214f923d5a1"
project_urls = "Repository, https://github.com/private-pypi/private-pypi"
requires_dist = "private-pypi-core (==0.1.3a15)"
requires_python = ">=3.7,<4.0"
description_content_type = "text/markdown"
":action" = "file_upload"
protocol_version = "1"
distrib = "private-pypi"
sha256 = "c3b9fc7ed0c6cbdb0fe4635c9755fc80c42d6ba584cd762ab0be4688a8cdd7ae"
[[pkgs]]
type = "github"
distrib = "private-pypi-github"
package = "private_pypi_github-0.1.1a23-py3-none-any"
ext = "whl"
sha256 = "16d29979f6832b2266b6f8919de71e18a4593e619eaa44582ed8f1eadbc6ea1a"
url = "https://api.github.com/repos/pywharf/pywharf-pkg-repo/releases/assets/18905090"
[pkgs.meta]
name = "private-pypi-github"
version = "0.1.1a23"
filetype = "bdist_wheel"
pyversion = "py3"
metadata_version = "2.1"
summary = ""
home_page = "https://github.com/private-pypi/private-pypi-github"
author = "huntzhan"
author_email = "[email protected]"
maintainer = ""
maintainer_email = ""
license = "MIT"
description = "# todo\n"
keywords = "private,pypi,github,packaging,dependency"
classifiers = "License :: OSI Approved :: MIT License"
download_url = ""
comment = ""
md5_digest = "230672096c1c926ee53aa3f36f8345b8"
sha256_digest = "16d29979f6832b2266b6f8919de71e18a4593e619eaa44582ed8f1eadbc6ea1a"
blake2_256_digest = "e74620c9b0102090b10c0d818865d32b4b103c42cbfb61fffa87d4661e998a01"
project_urls = "Repository, https://github.com/private-pypi/private-pypi-github"
requires_dist = "PyGithub (>=1.46,<2.0)"
requires_python = ">=3.7,<4.0"
description_content_type = "text/markdown"
":action" = "file_upload"
protocol_version = "1"
distrib = "private-pypi-github"
sha256 = "16d29979f6832b2266b6f8919de71e18a4593e619eaa44582ed8f1eadbc6ea1a"
[[pkgs]]
type = "github"
distrib = "private-pypi-core"
package = "private_pypi_core-0.1.3a15-py3-none-any"
ext = "whl"
sha256 = "1a48e26100da94f0073e7f56d0369b2c6b7300ad9978771fdef9acfdf68c4301"
url = "https://api.github.com/repos/pywharf/pywharf-pkg-repo/releases/assets/18905039"
[pkgs.meta]
name = "private-pypi-core"
version = "0.1.3a15"
filetype = "bdist_wheel"
pyversion = "py3"
metadata_version = "2.1"
summary = "A private PyPI server powered by flexible backends."
home_page = "https://github.com/private-pypi/private-pypi-core"
author = "huntzhan"
author_email = "[email protected]"
maintainer = ""
maintainer_email = ""
license = "MIT"
description = "# private-pypi-core\n\n## CLI\n\n`private_pypi_server`:\n\n```txt\nRun the private-pypi server.\n\nSYNOPSIS\n private_pypi_server ROOT <flags>\n\nPOSITIONAL ARGUMENTS\n ROOT (str):\n Path to the root folder.\n\nFLAGS\n --config (Optional[str]):\n Path to the package repository config,\n or the file content if --config_or_admin_secret_can_be_text is set.\n Defaults to None.\n --admin_secret (Optional[str]):\n Path to the admin secrets config with read/write permission.\n or the file content if --config_or_admin_secret_can_be_text is set.\n This field is required for local index synchronization.\n Defaults to None.\n --config_or_admin_secret_can_be_text (Optional[bool]):\n Enable passing the file content to --config or --admin_secret.\n Defaults to False.\n --auth_read_expires (int):\n The expiration time (in seconds) for read authentication.\n Defaults to 3600.\n --auth_write_expires (int):\n The expiration time (in seconds) for write authentication.\n Defaults to 300.\n --extra_index_url (str):\n Extra index url for redirection in case package not found.\n If set to empty string explicitly redirection will be suppressed.\n Defaults to 'https://pypi.org/simple/'.\n --debug (bool):\n Enable debug mode.\n Defaults to False.\n --host (str):\n The interface to bind to.\n Defaults to '0.0.0.0'.\n --port (int):\n The port to bind to.\n Defaults to 8080.\n **waitress_options (Dict[str, Any]):\n Optional arguments that `waitress.serve` takes.\n Details in https://docs.pylonsproject.org/projects/waitress/en/stable/arguments.html.\n Defaults to {}.\n```\n\n"
keywords = "private,pypi,packaging,dependency"
classifiers = "License :: OSI Approved :: MIT License"
download_url = ""
comment = ""
md5_digest = "c2e7c46e41bbea66e3c62ac611e39c78"
sha256_digest = "1a48e26100da94f0073e7f56d0369b2c6b7300ad9978771fdef9acfdf68c4301"
blake2_256_digest = "a0b40edf2b805bd54eb5f0844532c1c3a1747217c4c8fa8be3f520185c587248"
project_urls = "Repository, https://github.com/private-pypi/private-pypi-core"
requires_dist = "Jinja2 (>=2.11.1,<3.0.0)"
requires_python = ">=3.7,<4.0"
description_content_type = "text/markdown"
":action" = "file_upload"
protocol_version = "1"
distrib = "private-pypi-core"
sha256 = "1a48e26100da94f0073e7f56d0369b2c6b7300ad9978771fdef9acfdf68c4301"
[[pkgs]]
type = "github"
distrib = "private-pypi-github"
package = "private_pypi_github-0.1.1a22-py3-none-any"
ext = "whl"
sha256 = "20822a6d313fe0c3ece97757b0d7efa36495fde966930210240ad3318847add7"
url = "https://api.github.com/repos/pywharf/pywharf-pkg-repo/releases/assets/18905010"
[pkgs.meta]
name = "private-pypi-github"
version = "0.1.1a22"
filetype = "bdist_wheel"
pyversion = "py3"
metadata_version = "2.1"
summary = ""
home_page = "https://github.com/private-pypi/private-pypi-github"
author = "huntzhan"
author_email = "[email protected]"
maintainer = ""
maintainer_email = ""
license = "MIT"
description = "# todo\n"
keywords = "private,pypi,github,packaging,dependency"
classifiers = "License :: OSI Approved :: MIT License"
download_url = ""
comment = ""
md5_digest = "4fa5edbb15ed065d77f0afc2bb5a0096"
sha256_digest = "20822a6d313fe0c3ece97757b0d7efa36495fde966930210240ad3318847add7"
blake2_256_digest = "fc810589c8956767d620c89a2c87299cb483483027a234769644caa5a47f4716"
project_urls = "Repository, https://github.com/private-pypi/private-pypi-github"
requires_dist = "PyGithub (>=1.46,<2.0)"
requires_python = ">=3.7,<4.0"
description_content_type = "text/markdown"
":action" = "file_upload"
protocol_version = "1"
distrib = "private-pypi-github"
sha256 = "20822a6d313fe0c3ece97757b0d7efa36495fde966930210240ad3318847add7"
[[pkgs]]
type = "github"
distrib = "private-pypi-core"
package = "private_pypi_core-0.1.3a14-py3-none-any"
ext = "whl"
sha256 = "c6a5d2fe993ff1ff0a9f7aecabc7cb0632b706e8206b132831b135a7a3f2a4b1"
url = "https://api.github.com/repos/pywharf/pywharf-pkg-repo/releases/assets/18904890"
[pkgs.meta]
name = "private-pypi-core"
version = "0.1.3a14"
filetype = "bdist_wheel"
pyversion = "py3"
metadata_version = "2.1"
summary = "A private PyPI server powered by flexible backends."
home_page = "https://github.com/private-pypi/private-pypi-core"
author = "huntzhan"
author_email = "[email protected]"
maintainer = ""
maintainer_email = ""
license = "MIT"
description = "# private-pypi-core\n\n## CLI\n\n`private_pypi_server`:\n\n```txt\nRun the private-pypi server.\n\nSYNOPSIS\n private_pypi_server ROOT <flags>\n\nPOSITIONAL ARGUMENTS\n ROOT (str):\n Path to the root folder.\n\nFLAGS\n --config (Optional[str]):\n Path to the package repository config,\n or the file content if --config_or_admin_secret_can_be_text is set.\n Defaults to None.\n --admin_secret (Optional[str]):\n Path to the admin secrets config with read/write permission.\n or the file content if --config_or_admin_secret_can_be_text is set.\n This field is required for local index synchronization.\n Defaults to None.\n --config_or_admin_secret_can_be_text (Optional[bool]):\n Enable passing the file content to --config or --admin_secret.\n Defaults to False.\n --auth_read_expires (int):\n The expiration time (in seconds) for read authentication.\n Defaults to 3600.\n --auth_write_expires (int):\n The expiration time (in seconds) for write authentication.\n Defaults to 300.\n --extra_index_url (str):\n Extra index url for redirection in case package not found.\n If set to empty string explicitly redirection will be suppressed.\n Defaults to 'https://pypi.org/simple/'.\n --debug (bool):\n Enable debug mode.\n Defaults to False.\n --host (str):\n The interface to bind to.\n Defaults to 'localhost'.\n --port (int):\n The port to bind to.\n Defaults to 8080.\n **waitress_options (Dict[str, Any]):\n Optional arguments that `waitress.serve` takes.\n Details in https://docs.pylonsproject.org/projects/waitress/en/stable/arguments.html.\n Defaults to {}.\n```\n\n"
keywords = "private,pypi,packaging,dependency"
classifiers = "License :: OSI Approved :: MIT License"
download_url = ""
comment = ""
md5_digest = "a405d4279dd13c8f9e3a9213bac89797"
sha256_digest = "c6a5d2fe993ff1ff0a9f7aecabc7cb0632b706e8206b132831b135a7a3f2a4b1"
blake2_256_digest = "21da54e9f0dbe0223593fb62ede9d7d4356a3ddda790227a2530319b20fae5f7"
project_urls = "Repository, https://github.com/private-pypi/private-pypi-core"
requires_dist = "Jinja2 (>=2.11.1,<3.0.0)"
requires_python = ">=3.7,<4.0"
description_content_type = "text/markdown"
":action" = "file_upload"
protocol_version = "1"
distrib = "private-pypi-core"
sha256 = "c6a5d2fe993ff1ff0a9f7aecabc7cb0632b706e8206b132831b135a7a3f2a4b1"
[[pkgs]]
type = "github"
distrib = "private-pypi"
package = "private_pypi-0.1.0a14-py3-none-any"
ext = "whl"
sha256 = "d704ca61ca480757095785116bb9cf84247b433199c1625c1d4606dfba303371"
url = "https://api.github.com/repos/pywharf/pywharf-pkg-repo/releases/assets/18904456"
[pkgs.meta]
name = "private-pypi"
version = "0.1.0a14"
filetype = "bdist_wheel"
pyversion = "py3"
metadata_version = "2.1"
summary = "A private PyPI server powered by flexible backends."
home_page = "https://github.com/private-pypi/private-pypi"
author = "huntzhan"
author_email = "[email protected]"
maintainer = ""
maintainer_email = ""
license = "MIT"
description = "# TODO\n"
keywords = "private,pypi,packaging,dependency"
classifiers = "License :: OSI Approved :: MIT License"
download_url = ""
comment = ""
md5_digest = "867ce3ab35f169e206354a574d77c5cc"
sha256_digest = "d704ca61ca480757095785116bb9cf84247b433199c1625c1d4606dfba303371"
blake2_256_digest = "36916150dc83075e684d9f558472104c55418f094cf43b413aef0a5cd7318419"
project_urls = "Repository, https://github.com/private-pypi/private-pypi"
requires_dist = "private-pypi-core (==0.1.3a13)"
requires_python = ">=3.7,<4.0"
description_content_type = "text/markdown"
":action" = "file_upload"
protocol_version = "1"
distrib = "private-pypi"
sha256 = "d704ca61ca480757095785116bb9cf84247b433199c1625c1d4606dfba303371"
[[pkgs]]
type = "github"
distrib = "private-pypi-github"
package = "private_pypi_github-0.1.1a21-py3-none-any"
ext = "whl"
sha256 = "f2b62b462ddf402b71b1b74847b6494ba5dddb988d45b677715892b95da67305"
url = "https://api.github.com/repos/pywharf/pywharf-pkg-repo/releases/assets/18904212"
[pkgs.meta]
name = "private-pypi-github"
version = "0.1.1a21"
filetype = "bdist_wheel"
pyversion = "py3"
metadata_version = "2.1"
summary = ""
home_page = "https://github.com/private-pypi/private-pypi-github"
author = "huntzhan"
author_email = "[email protected]"
maintainer = ""
maintainer_email = ""
license = "MIT"
description = "# todo\n"
keywords = "private,pypi,github,packaging,dependency"
classifiers = "License :: OSI Approved :: MIT License"
download_url = ""
comment = ""
md5_digest = "77058b0efda0b97bd8d32caa83cf938c"
sha256_digest = "f2b62b462ddf402b71b1b74847b6494ba5dddb988d45b677715892b95da67305"
blake2_256_digest = "a9dd23fdb8c58346a50a728ba75f087b7bf6a5b00c5fb6925b79620ac36df2ca"
project_urls = "Repository, https://github.com/private-pypi/private-pypi-github"
requires_dist = "PyGithub (>=1.46,<2.0)"
requires_python = ">=3.7,<4.0"
description_content_type = "text/markdown"
":action" = "file_upload"
protocol_version = "1"
distrib = "private-pypi-github"
sha256 = "f2b62b462ddf402b71b1b74847b6494ba5dddb988d45b677715892b95da67305"
[[pkgs]]
type = "github"
distrib = "private-pypi-core"
package = "private_pypi_core-0.1.3a13-py3-none-any"
ext = "whl"
sha256 = "c05f249e93f7d07f266c85fd7cb659719504e0c72d33d877cbaab3bf7ade5de6"
url = "https://api.github.com/repos/pywharf/pywharf-pkg-repo/releases/assets/18898692"
[pkgs.meta]
name = "private-pypi-core"
version = "0.1.3a13"
filetype = "bdist_wheel"
pyversion = "py3"
metadata_version = "2.1"
summary = "A private PyPI server powered by flexible backends."
home_page = "https://github.com/private-pypi/private-pypi-core"
author = "huntzhan"
author_email = "[email protected]"
maintainer = ""
maintainer_email = ""
license = "MIT"
description = "# private-pypi-core\n\n## CLI\n\n`private_pypi_server`:\n\n```txt\nRun the private-pypi server.\n\nSYNOPSIS\n private_pypi_server ROOT <flags>\n\nPOSITIONAL ARGUMENTS\n ROOT (str):\n Path to the root folder.\n\nFLAGS\n --config (Optional[str]):\n Path to the package repository config,\n or the file content if --config_or_admin_secret_can_be_text is set.\n Defaults to None.\n --admin_secret (Optional[str]):\n Path to the admin secrets config with read/write permission.\n or the file content if --config_or_admin_secret_can_be_text is set.\n This field is required for local index synchronization.\n Defaults to None.\n --config_or_admin_secret_can_be_text (Optional[bool]):\n Enable passing the file content to --config or --admin_secret.\n Defaults to False.\n --auth_read_expires (int):\n The expiration time (in seconds) for read authentication.\n Defaults to 3600.\n --auth_write_expires (int):\n The expiration time (in seconds) for write authentication.\n Defaults to 300.\n --extra_index_url (str):\n Extra index url for redirection in case package not found.\n If set to empty string explicitly redirection will be suppressed.\n Defaults to 'https://pypi.org/simple/'.\n --debug (bool):\n Enable debug mode.\n Defaults to False.\n --host (str):\n The interface to bind to.\n Defaults to 'localhost'.\n --port (int):\n The port to bind to.\n Defaults to 8080.\n **waitress_options (Dict[str, Any]):\n Optional arguments that `waitress.serve` takes.\n Details in https://docs.pylonsproject.org/projects/waitress/en/stable/arguments.html.\n Defaults to {}.\n```\n\n"
keywords = "private,pypi,packaging,dependency"
classifiers = "License :: OSI Approved :: MIT License"
download_url = ""
comment = ""
md5_digest = "beb1a23f185f02ad83be44fc11dbf0f3"
sha256_digest = "c05f249e93f7d07f266c85fd7cb659719504e0c72d33d877cbaab3bf7ade5de6"
blake2_256_digest = "3ca50c6e1546244af230a641365effd32f8d1922f2e676d48954f638a478dba3"
project_urls = "Repository, https://github.com/private-pypi/private-pypi-core"
requires_dist = "Jinja2 (>=2.11.1,<3.0.0)"
requires_python = ">=3.7,<4.0"
description_content_type = "text/markdown"
":action" = "file_upload"
protocol_version = "1"
distrib = "private-pypi-core"
sha256 = "c05f249e93f7d07f266c85fd7cb659719504e0c72d33d877cbaab3bf7ade5de6"
[[pkgs]]
type = "github"
distrib = "psutil"
package = "psutil-5.7.0-cp38-cp38-manylinux2010_x86_64"
ext = "whl"
sha256 = "adc36dabdff0b9a4c84821ef5ce45848f30b8a01a1d5806316e068b5fd669c6d"
url = "https://api.github.com/repos/pywharf/pywharf-pkg-repo/releases/assets/18872849"
[pkgs.meta]
name = "psutil"
version = "5.7.0"
filetype = "bdist_wheel"
pyversion = "cp38"
metadata_version = "2.1"
summary = "Cross-platform lib for process and system monitoring in Python."
home_page = "https://github.com/giampaolo/psutil"
author = "Giampaolo Rodola"
author_email = "[email protected]"
maintainer = ""
maintainer_email = ""
license = "BSD"
description = "| |downloads| |stars| |forks| |contributors| |coverage| |quality|\n| |version| |py-versions| |packages| |license|\n| |travis| |appveyor| |cirrus| |doc| |twitter| |tidelift|\n\n.. |downloads| image:: https://img.shields.io/pypi/dm/psutil.svg\n :target: https://pepy.tech/project/psutil\n :alt: Downloads\n\n.. |stars| image:: https://img.shields.io/github/stars/giampaolo/psutil.svg\n :target: https://github.com/giampaolo/psutil/stargazers\n :alt: Github stars\n\n.. |forks| image:: https://img.shields.io/github/forks/giampaolo/psutil.svg\n :target: https://github.com/giampaolo/psutil/network/members\n :alt: Github forks\n\n.. |contributors| image:: https://img.shields.io/github/contributors/giampaolo/psutil.svg\n :target: https://github.com/giampaolo/psutil/graphs/contributors\n :alt: Contributors\n\n.. |quality| image:: https://img.shields.io/codacy/grade/ce63e7f7f69d44b5b59682196e6fbfca.svg\n :target: https://www.codacy.com/app/g-rodola/psutil?utm_source=github.com&utm_medium=referral&utm_content=giampaolo/psutil&utm_campaign=Badge_Grade\n :alt: Code quality\n\n.. |travis| image:: https://img.shields.io/travis/giampaolo/psutil/master.svg?maxAge=3600&label=Linux,%20OSX,%20PyPy\n :target: https://travis-ci.org/giampaolo/psutil\n :alt: Linux tests (Travis)\n\n.. |appveyor| image:: https://img.shields.io/appveyor/ci/giampaolo/psutil/master.svg?maxAge=3600&label=Windows\n :target: https://ci.appveyor.com/project/giampaolo/psutil\n :alt: Windows tests (Appveyor)\n\n.. |cirrus| image:: https://img.shields.io/cirrus/github/giampaolo/psutil?label=FreeBSD\n :target: https://cirrus-ci.com/github/giampaolo/psutil-cirrus-ci\n :alt: FreeBSD tests (Cirrus-Ci)\n\n.. |coverage| image:: https://img.shields.io/coveralls/github/giampaolo/psutil.svg?label=test%20coverage\n :target: https://coveralls.io/github/giampaolo/psutil?branch=master\n :alt: Test coverage (coverall.io)\n\n.. |doc| image:: https://readthedocs.org/projects/psutil/badge/?version=latest\n :target: http://psutil.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. |version| image:: https://img.shields.io/pypi/v/psutil.svg?label=pypi\n :target: https://pypi.org/project/psutil\n :alt: Latest version\n\n.. |py-versions| image:: https://img.shields.io/pypi/pyversions/psutil.svg\n :target: https://pypi.org/project/psutil\n :alt: Supported Python versions\n\n.. |packages| image:: https://repology.org/badge/tiny-repos/python:psutil.svg\n :target: https://repology.org/metapackage/python:psutil/versions\n :alt: Binary packages\n\n.. |license| image:: https://img.shields.io/pypi/l/psutil.svg\n :target: https://github.com/giampaolo/psutil/blob/master/LICENSE\n :alt: License\n\n.. |twitter| image:: https://img.shields.io/twitter/follow/grodola.svg?label=follow&style=flat&logo=twitter&logoColor=4FADFF\n :target: https://twitter.com/grodola\n :alt: Twitter Follow\n\n.. |tidelift| image:: https://tidelift.com/badges/github/giampaolo/psutil?style=flat\n :target: https://tidelift.com/subscription/pkg/pypi-psutil?utm_source=pypi-psutil&utm_medium=referral&utm_campaign=readme\n :alt: Tidelift\n\n-----\n\nQuick links\n===========\n\n- `Home page <https://github.com/giampaolo/psutil>`_\n- `Install <https://github.com/giampaolo/psutil/blob/master/INSTALL.rst>`_\n- `Documentation <http://psutil.readthedocs.io>`_\n- `Download <https://pypi.org/project/psutil/#files>`_\n- `Forum <http://groups.google.com/group/psutil/topics>`_\n- `StackOverflow <https://stackoverflow.com/questions/tagged/psutil>`_\n- `Blog <http://grodola.blogspot.com/search/label/psutil>`_\n- `Development guide <https://github.com/giampaolo/psutil/blob/master/docs/DEVGUIDE.rst>`_\n- `What's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst>`_\n\nSummary\n=======\n\npsutil (process and system utilities) is a cross-platform library for\nretrieving information on **running processes** and **system utilization**\n(CPU, memory, disks, network, sensors) in Python.\nIt is useful mainly for **system monitoring**, **profiling and limiting process\nresources** and **management of running processes**.\nIt implements many functionalities offered by classic UNIX command line tools\nsuch as *ps, top, iotop, lsof, netstat, ifconfig, free* and others.\npsutil currently supports the following platforms:\n\n- **Linux**\n- **Windows**\n- **macOS**\n- **FreeBSD, OpenBSD**, **NetBSD**\n- **Sun Solaris**\n- **AIX**\n\n...both **32-bit** and **64-bit** architectures. Supported Python versions are **2.6**, **2.7** and **3.4+**. `PyPy3 <http://pypy.org/>`__ is also known to work.\n\npsutil for enterprise\n=====================\n\n.. |tideliftlogo| image:: https://nedbatchelder.com/pix/Tidelift_Logos_RGB_Tidelift_Shorthand_On-White_small.png\n :width: 150\n :alt: Tidelift\n :target: https://tidelift.com/subscription/pkg/pypi-psutil?utm_source=pypi-psutil&utm_medium=referral&utm_campaign=readme\n\n.. list-table::\n :widths: 10 150\n\n * - |tideliftlogo|\n - The maintainer of psutil and thousands of other packages are working\n with Tidelift to deliver commercial support and maintenance for the open\n source dependencies you use to build your applications. Save time,\n reduce risk, and improve code health, while paying the maintainers of\n the exact dependencies you use.\n `Learn more <https://tidelift.com/subscription/pkg/pypi-psutil?utm_source=pypi-psutil&utm_medium=referral&utm_campaign=enterprise&utm_term=repo>`__.\n\n By subscribing to Tidelift you will help me (`Giampaolo Rodola`_) support\n psutil future development. Alternatively consider making a small\n `donation`_.\n\nSecurity\n========\n\nTo report a security vulnerability, please use the `Tidelift security\ncontact`_. Tidelift will coordinate the fix and disclosure.\n\nExample applications\n====================\n\n+------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+\n| .. image:: https://github.com/giampaolo/psutil/blob/master/docs/_static/procinfo-small.png | .. image:: https://github.com/giampaolo/psutil/blob/master/docs/_static/top-small.png |\n| :target: https://github.com/giampaolo/psutil/blob/master/docs/_static/procinfo.png | :target: https://github.com/giampaolo/psutil/blob/master/docs/_static/top.png |\n+------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+\n| .. image:: https://github.com/giampaolo/psutil/blob/master/docs/_static/procsmem-small.png | .. image:: https://github.com/giampaolo/psutil/blob/master/docs/_static/pmap-small.png |\n| :target: https://github.com/giampaolo/psutil/blob/master/docs/_static/procsmem.png | :target: https://github.com/giampaolo/psutil/blob/master/docs/_static/pmap.png |\n+------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+\n\nAlso see `scripts directory <https://github.com/giampaolo/psutil/tree/master/scripts>`__\nand `doc recipes <http://psutil.readthedocs.io/#recipes/>`__.\n\nProjects using psutil\n=====================\n\npsutil has roughly the following monthly downloads:\n\n.. image:: https://img.shields.io/pypi/dm/psutil.svg\n :target: https://pepy.tech/project/psutil\n :alt: Downloads\n\nThere are over\n`10.000 open source projects <https://libraries.io/pypi/psutil/dependent_repositories?page=1>`__\non github which depend from psutil.\nHere's some I find particularly interesting:\n\n- https://github.com/google/grr\n- https://github.com/facebook/osquery/\n- https://github.com/nicolargo/glances\n- https://github.com/Jahaja/psdash\n- https://github.com/ajenti/ajenti\n- https://github.com/home-assistant/home-assistant/\n\n\nPortings\n========\n\n- Go: https://github.com/shirou/gopsutil\n- C: https://github.com/hamon-in/cpslib\n- Rust: https://github.com/borntyping/rust-psutil\n- Nim: https://github.com/johnscillieri/psutil-nim\n\n\nExample usages\n==============\n\nThis represents pretty much the whole psutil API.\n\nCPU\n---\n\n.. code-block:: python\n\n >>> import psutil\n >>>\n >>> psutil.cpu_times()\n scputimes(user=3961.46, nice=169.729, system=2150.659, idle=16900.540, iowait=629.59, irq=0.0, softirq=19.42, steal=0.0, guest=0, nice=0.0)\n >>>\n >>> for x in range(3):\n ... psutil.cpu_percent(interval=1)\n ...\n 4.0\n 5.9\n 3.8\n >>>\n >>> for x in range(3):\n ... psutil.cpu_percent(interval=1, percpu=True)\n ...\n [4.0, 6.9, 3.7, 9.2]\n [7.0, 8.5, 2.4, 2.1]\n [1.2, 9.0, 9.9, 7.2]\n >>>\n >>> for x in range(3):\n ... psutil.cpu_times_percent(interval=1, percpu=False)\n ...\n scputimes(user=1.5, nice=0.0, system=0.5, idle=96.5, iowait=1.5, irq=0.0, softirq=0.0, steal=0.0, guest=0.0, guest_nice=0.0)\n scputimes(user=1.0, nice=0.0, system=0.0, idle=99.0, iowait=0.0, irq=0.0, softirq=0.0, steal=0.0, guest=0.0, guest_nice=0.0)\n scputimes(user=2.0, nice=0.0, system=0.0, idle=98.0, iowait=0.0, irq=0.0, softirq=0.0, steal=0.0, guest=0.0, guest_nice=0.0)\n >>>\n >>> psutil.cpu_count()\n 4\n >>> psutil.cpu_count(logical=False)\n 2\n >>>\n >>> psutil.cpu_stats()\n scpustats(ctx_switches=20455687, interrupts=6598984, soft_interrupts=2134212, syscalls=0)\n >>>\n >>> psutil.cpu_freq()\n scpufreq(current=931.42925, min=800.0, max=3500.0)\n >>>\n >>> psutil.getloadavg() # also on Windows (emulated)\n (3.14, 3.89, 4.67)\n\nMemory\n------\n\n.. code-block:: python\n\n >>> psutil.virtual_memory()\n svmem(total=10367352832, available=6472179712, percent=37.6, used=8186245120, free=2181107712, active=4748992512, inactive=2758115328, buffers=790724608, cached=3500347392, shared=787554304)\n >>> psutil.swap_memory()\n sswap(total=2097147904, used=296128512, free=1801019392, percent=14.1, sin=304193536, sout=677842944)\n >>>\n\nDisks\n-----\n\n.. code-block:: python\n\n >>> psutil.disk_partitions()\n [sdiskpart(device='/dev/sda1', mountpoint='/', fstype='ext4', opts='rw,nosuid'),\n sdiskpart(device='/dev/sda2', mountpoint='/home', fstype='ext, opts='rw')]\n >>>\n >>> psutil.disk_usage('/')\n sdiskusage(total=21378641920, used=4809781248, free=15482871808, percent=22.5)\n >>>\n >>> psutil.disk_io_counters(perdisk=False)\n sdiskio(read_count=719566, write_count=1082197, read_bytes=18626220032, write_bytes=24081764352, read_time=5023392, write_time=63199568, read_merged_count=619166, write_merged_count=812396, busy_time=4523412)\n >>>\n\nNetwork\n-------\n\n.. code-block:: python\n\n >>> psutil.net_io_counters(pernic=True)\n {'eth0': netio(bytes_sent=485291293, bytes_recv=6004858642, packets_sent=3251564, packets_recv=4787798, errin=0, errout=0, dropin=0, dropout=0),\n 'lo': netio(bytes_sent=2838627, bytes_recv=2838627, packets_sent=30567, packets_recv=30567, errin=0, errout=0, dropin=0, dropout=0)}\n >>>\n >>> psutil.net_connections()\n [sconn(fd=115, family=<AddressFamily.AF_INET: 2>, type=<SocketType.SOCK_STREAM: 1>, laddr=addr(ip='10.0.0.1', port=48776), raddr=addr(ip='93.186.135.91', port=80), status='ESTABLISHED', pid=1254),\n sconn(fd=117, family=<AddressFamily.AF_INET: 2>, type=<SocketType.SOCK_STREAM: 1>, laddr=addr(ip='10.0.0.1', port=43761), raddr=addr(ip='72.14.234.100', port=80), status='CLOSING', pid=2987),\n ...]\n >>>\n >>> psutil.net_if_addrs()\n {'lo': [snicaddr(family=<AddressFamily.AF_INET: 2>, address='127.0.0.1', netmask='255.0.0.0', broadcast='127.0.0.1', ptp=None),\n snicaddr(family=<AddressFamily.AF_INET6: 10>, address='::1', netmask='ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff', broadcast=None, ptp=None),\n snicaddr(family=<AddressFamily.AF_LINK: 17>, address='00:00:00:00:00:00', netmask=None, broadcast='00:00:00:00:00:00', ptp=None)],\n 'wlan0': [snicaddr(family=<AddressFamily.AF_INET: 2>, address='192.168.1.3', netmask='255.255.255.0', broadcast='192.168.1.255', ptp=None),\n snicaddr(family=<AddressFamily.AF_INET6: 10>, address='fe80::c685:8ff:fe45:641%wlan0', netmask='ffff:ffff:ffff:ffff::', broadcast=None, ptp=None),\n snicaddr(family=<AddressFamily.AF_LINK: 17>, address='c4:85:08:45:06:41', netmask=None, broadcast='ff:ff:ff:ff:ff:ff', ptp=None)]}\n >>>\n >>> psutil.net_if_stats()\n {'lo': snicstats(isup=True, duplex=<NicDuplex.NIC_DUPLEX_UNKNOWN: 0>, speed=0, mtu=65536),\n 'wlan0': snicstats(isup=True, duplex=<NicDuplex.NIC_DUPLEX_FULL: 2>, speed=100, mtu=1500)}\n >>>\n\nSensors\n-------\n\n.. code-block:: python\n\n >>> import psutil\n >>> psutil.sensors_temperatures()\n {'acpitz': [shwtemp(label='', current=47.0, high=103.0, critical=103.0)],\n 'asus': [shwtemp(label='', current=47.0, high=None, critical=None)],\n 'coretemp': [shwtemp(label='Physical id 0', current=52.0, high=100.0, critical=100.0),\n shwtemp(label='Core 0', current=45.0, high=100.0, critical=100.0)]}\n >>>\n >>> psutil.sensors_fans()\n {'asus': [sfan(label='cpu_fan', current=3200)]}\n >>>\n >>> psutil.sensors_battery()\n sbattery(percent=93, secsleft=16628, power_plugged=False)\n >>>\n\nOther system info\n-----------------\n\n.. code-block:: python\n\n >>> import psutil\n >>> psutil.users()\n [suser(name='giampaolo', terminal='pts/2', host='localhost', started=1340737536.0, pid=1352),\n suser(name='giampaolo', terminal='pts/3', host='localhost', started=1340737792.0, pid=1788)]\n >>>\n >>> psutil.boot_time()\n 1365519115.0\n >>>\n\nProcess management\n------------------\n\n.. code-block:: python\n\n >>> import psutil\n >>> psutil.pids()\n [1, 2, 3, 4, 5, 6, 7, 46, 48, 50, 51, 178, 182, 222, 223, 224, 268, 1215, 1216, 1220, 1221, 1243, 1244,\n 1301, 1601, 2237, 2355, 2637, 2774, 3932, 4176, 4177, 4185, 4187, 4189, 4225, 4243, 4245, 4263, 4282,\n 4306, 4311, 4312, 4313, 4314, 4337, 4339, 4357, 4358, 4363, 4383, 4395, 4408, 4433, 4443, 4445, 4446,\n 5167, 5234, 5235, 5252, 5318, 5424, 5644, 6987, 7054, 7055, 7071]\n >>>\n >>> p = psutil.Process(7055)\n >>> p\n psutil.Process(pid=7055, name='python', started='09:04:44')\n >>> p.name()\n 'python'\n >>> p.exe()\n '/usr/bin/python'\n >>> p.cwd()\n '/home/giampaolo'\n >>> p.cmdline()\n ['/usr/bin/python', 'main.py']\n >>>\n >>> p.pid\n 7055\n >>> p.ppid()\n 7054\n >>> p.children(recursive=True)\n [psutil.Process(pid=29835, name='python2.7', started='11:45:38'),\n psutil.Process(pid=29836, name='python2.7', started='11:43:39')]\n >>>\n >>> p.parent()\n psutil.Process(pid=4699, name='bash', started='09:06:44')\n >>> p.parents()\n [psutil.Process(pid=4699, name='bash', started='09:06:44'),\n psutil.Process(pid=4689, name='gnome-terminal-server', started='0:06:44'),\n psutil.Process(pid=1, name='systemd', started='05:56:55')]\n >>>\n >>> p.status()\n 'running'\n >>> p.username()\n 'giampaolo'\n >>> p.create_time()\n 1267551141.5019531\n >>> p.terminal()\n '/dev/pts/0'\n >>>\n >>> p.uids()\n puids(real=1000, effective=1000, saved=1000)\n >>> p.gids()\n pgids(real=1000, effective=1000, saved=1000)\n >>>\n >>> p.cpu_times()\n pcputimes(user=1.02, system=0.31, children_user=0.32, children_system=0.1, iowait=0.0)\n >>> p.cpu_percent(interval=1.0)\n 12.1\n >>> p.cpu_affinity()\n [0, 1, 2, 3]\n >>> p.cpu_affinity([0, 1]) # set\n >>> p.cpu_num()\n 1\n >>>\n >>> p.memory_info()\n pmem(rss=10915840, vms=67608576, shared=3313664, text=2310144, lib=0, data=7262208, dirty=0)\n >>> p.memory_full_info() # \"real\" USS memory usage (Linux, macOS, Win only)\n pfullmem(rss=10199040, vms=52133888, shared=3887104, text=2867200, lib=0, data=5967872, dirty=0, uss=6545408, pss=6872064, swap=0)\n >>> p.memory_percent()\n 0.7823\n >>> p.memory_maps()\n [pmmap_grouped(path='/lib/x8664-linux-gnu/libutil-2.15.so', rss=32768, size=2125824, pss=32768, shared_clean=0, shared_dirty=0, private_clean=20480, private_dirty=12288, referenced=32768, anonymous=12288, swap=0),\n pmmap_grouped(path='/lib/x8664-linux-gnu/libc-2.15.so', rss=3821568, size=3842048, pss=3821568, shared_clean=0, shared_dirty=0, private_clean=0, private_dirty=3821568, referenced=3575808, anonymous=3821568, swap=0),\n pmmap_grouped(path='[heap]', rss=32768, size=139264, pss=32768, shared_clean=0, shared_dirty=0, private_clean=0, private_dirty=32768, referenced=32768, anonymous=32768, swap=0),\n pmmap_grouped(path='[stack]', rss=2465792, size=2494464, pss=2465792, shared_clean=0, shared_dirty=0, private_clean=0, private_dirty=2465792, referenced=2277376, anonymous=2465792, swap=0),\n ...]\n >>>\n >>> p.io_counters()\n pio(read_count=478001, write_count=59371, read_bytes=700416, write_bytes=69632, read_chars=456232, write_chars=517543)\n >>>\n >>> p.open_files()\n [popenfile(path='/home/giampaolo/monit.py', fd=3, position=0, mode='r', flags=32768),\n popenfile(path='/var/log/monit.log', fd=4, position=235542, mode='a', flags=33793)]\n >>>\n >>> p.connections()\n [pconn(fd=115, family=<AddressFamily.AF_INET: 2>, type=<SocketType.SOCK_STREAM: 1>, laddr=addr(ip='10.0.0.1', port=48776), raddr=addr(ip='93.186.135.91', port=80), status='ESTABLISHED'),\n pconn(fd=117, family=<AddressFamily.AF_INET: 2>, type=<SocketType.SOCK_STREAM: 1>, laddr=addr(ip='10.0.0.1', port=43761), raddr=addr(ip='72.14.234.100', port=80), status='CLOSING')]\n >>>\n >>> p.num_threads()\n 4\n >>> p.num_fds()\n 8\n >>> p.threads()\n [pthread(id=5234, user_time=22.5, system_time=9.2891),\n pthread(id=5237, user_time=0.0707, system_time=1.1)]\n >>>\n >>> p.num_ctx_switches()\n pctxsw(voluntary=78, involuntary=19)\n >>>\n >>> p.nice()\n 0\n >>> p.nice(10) # set\n >>>\n >>> p.ionice(psutil.IOPRIO_CLASS_IDLE) # IO priority (Win and Linux only)\n >>> p.ionice()\n pionice(ioclass=<IOPriority.IOPRIO_CLASS_IDLE: 3>, value=0)\n >>>\n >>> p.rlimit(psutil.RLIMIT_NOFILE, (5, 5)) # set resource limits (Linux only)\n >>> p.rlimit(psutil.RLIMIT_NOFILE)\n (5, 5)\n >>>\n >>> p.environ()\n {'LC_PAPER': 'it_IT.UTF-8', 'SHELL': '/bin/bash', 'GREP_OPTIONS': '--color=auto',\n 'XDG_CONFIG_DIRS': '/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg',\n ...}\n >>>\n >>> p.as_dict()\n {'status': 'running', 'num_ctx_switches': pctxsw(voluntary=63, involuntary=1), 'pid': 5457, ...}\n >>> p.is_running()\n True\n >>> p.suspend()\n >>> p.resume()\n >>>\n >>> p.terminate()\n >>> p.kill()\n >>> p.wait(timeout=3)\n 0\n >>>\n >>> psutil.test()\n USER PID %CPU %MEM VSZ RSS TTY START TIME COMMAND\n root 1 0.0 0.0 24584 2240 Jun17 00:00 init\n root 2 0.0 0.0 0 0 Jun17 00:00 kthreadd\n ...\n giampaolo 31475 0.0 0.0 20760 3024 /dev/pts/0 Jun19 00:00 python2.4\n giampaolo 31721 0.0 2.2 773060 181896 00:04 10:30 chrome\n root 31763 0.0 0.0 0 0 00:05 00:00 kworker/0:1\n >>>\n\nFurther process APIs\n--------------------\n\n.. code-block:: python\n\n >>> import psutil\n >>> for proc in psutil.process_iter(['pid', 'name']):\n ... print(proc.info)\n ...\n {'pid': 1, 'name': 'systemd'}\n {'pid': 2, 'name': 'kthreadd'}\n {'pid': 3, 'name': 'ksoftirqd/0'}\n ...\n >>>\n >>> psutil.pid_exists(3)\n True\n >>>\n >>> def on_terminate(proc):\n ... print(\"process {} terminated\".format(proc))\n ...\n >>> # waits for multiple processes to terminate\n >>> gone, alive = psutil.wait_procs(procs_list, timeout=3, callback=on_terminate)\n >>>\n\nPopen wrapper:\n\n.. code-block:: python\n\n >>> import psutil\n >>> from subprocess import PIPE\n >>> p = psutil.Popen([\"/usr/bin/python\", \"-c\", \"print('hello')\"], stdout=PIPE)\n >>> p.name()\n 'python'\n >>> p.username()\n 'giampaolo'\n >>> p.communicate()\n ('hello\\n', None)\n >>> p.wait(timeout=2)\n 0\n >>>\n\nWindows services\n----------------\n\n.. code-block:: python\n\n >>> list(psutil.win_service_iter())\n [<WindowsService(name='AeLookupSvc', display_name='Application Experience') at 38850096>,\n <WindowsService(name='ALG', display_name='Application Layer Gateway Service') at 38850128>,\n <WindowsService(name='APNMCP', display_name='Ask Update Service') at 38850160>,\n <WindowsService(name='AppIDSvc', display_name='Application Identity') at 38850192>,\n ...]\n >>> s = psutil.win_service_get('alg')\n >>> s.as_dict()\n {'binpath': 'C:\\\\Windows\\\\System32\\\\alg.exe',\n 'description': 'Provides support for 3rd party protocol plug-ins for Internet Connection Sharing',\n 'display_name': 'Application Layer Gateway Service',\n 'name': 'alg',\n 'pid': None,\n 'start_type': 'manual',\n 'status': 'stopped',\n 'username': 'NT AUTHORITY\\\\LocalService'}\n\n\n.. _`Giampaolo Rodola`: http://grodola.blogspot.com/p/about.html\n.. _`donation`: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A9ZS7PKKRM3S8\n.. _Tidelift security contact: https://tidelift.com/security\n.. _Tidelift Subscription: https://tidelift.com/subscription/pkg/pypi-psutil?utm_source=pypi-psutil&utm_medium=referral&utm_campaign=readme\n\n\n\n"
keywords = "ps,top,kill,free,lsof,netstat,nice,tty,ionice,uptime,taskmgr,process,df,iotop,iostat,ifconfig,taskset,who,pidof,pmap,smem,pstree,monitoring,ulimit,prlimit,smem,performance,metrics,agent,observability"
platform = "Platform Independent"
classifiers = "Development Status :: 5 - Production/Stable"
download_url = ""
comment = ""
md5_digest = "bd55094a6d6bf1d74249db255ade1069"
sha256_digest = "adc36dabdff0b9a4c84821ef5ce45848f30b8a01a1d5806316e068b5fd669c6d"
blake2_256_digest = "d512b54555288d007cfefdd9fd9bfc9d38a4c5396262c3b8f77cdddfb8f6e78a"
requires_python = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
description_content_type = ""
":action" = "file_upload"
protocol_version = "1"
distrib = "psutil"
sha256 = "adc36dabdff0b9a4c84821ef5ce45848f30b8a01a1d5806316e068b5fd669c6d"
[[pkgs]]
type = "github"
distrib = "psutil"
package = "psutil-5.7.0-cp38-cp38-manylinux2010_i686"
ext = "whl"
sha256 = "b164827def7ea70e8fab2962df11621d6075205dc42a72b00c2c5e941931c1e7"
url = "https://api.github.com/repos/pywharf/pywharf-pkg-repo/releases/assets/18872848"
[pkgs.meta]
name = "psutil"
version = "5.7.0"
filetype = "bdist_wheel"
pyversion = "cp38"
metadata_version = "2.1"
summary = "Cross-platform lib for process and system monitoring in Python."
home_page = "https://github.com/giampaolo/psutil"
author = "Giampaolo Rodola"
author_email = "[email protected]"
maintainer = ""
maintainer_email = ""
license = "BSD"
description = "| |downloads| |stars| |forks| |contributors| |coverage| |quality|\n| |version| |py-versions| |packages| |license|\n| |travis| |appveyor| |cirrus| |doc| |twitter| |tidelift|\n\n.. |downloads| image:: https://img.shields.io/pypi/dm/psutil.svg\n :target: https://pepy.tech/project/psutil\n :alt: Downloads\n\n.. |stars| image:: https://img.shields.io/github/stars/giampaolo/psutil.svg\n :target: https://github.com/giampaolo/psutil/stargazers\n :alt: Github stars\n\n.. |forks| image:: https://img.shields.io/github/forks/giampaolo/psutil.svg\n :target: https://github.com/giampaolo/psutil/network/members\n :alt: Github forks\n\n.. |contributors| image:: https://img.shields.io/github/contributors/giampaolo/psutil.svg\n :target: https://github.com/giampaolo/psutil/graphs/contributors\n :alt: Contributors\n\n.. |quality| image:: https://img.shields.io/codacy/grade/ce63e7f7f69d44b5b59682196e6fbfca.svg\n :target: https://www.codacy.com/app/g-rodola/psutil?utm_source=github.com&utm_medium=referral&utm_content=giampaolo/psutil&utm_campaign=Badge_Grade\n :alt: Code quality\n\n.. |travis| image:: https://img.shields.io/travis/giampaolo/psutil/master.svg?maxAge=3600&label=Linux,%20OSX,%20PyPy\n :target: https://travis-ci.org/giampaolo/psutil\n :alt: Linux tests (Travis)\n\n.. |appveyor| image:: https://img.shields.io/appveyor/ci/giampaolo/psutil/master.svg?maxAge=3600&label=Windows\n :target: https://ci.appveyor.com/project/giampaolo/psutil\n :alt: Windows tests (Appveyor)\n\n.. |cirrus| image:: https://img.shields.io/cirrus/github/giampaolo/psutil?label=FreeBSD\n :target: https://cirrus-ci.com/github/giampaolo/psutil-cirrus-ci\n :alt: FreeBSD tests (Cirrus-Ci)\n\n.. |coverage| image:: https://img.shields.io/coveralls/github/giampaolo/psutil.svg?label=test%20coverage\n :target: https://coveralls.io/github/giampaolo/psutil?branch=master\n :alt: Test coverage (coverall.io)\n\n.. |doc| image:: https://readthedocs.org/projects/psutil/badge/?version=latest\n :target: http://psutil.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. |version| image:: https://img.shields.io/pypi/v/psutil.svg?label=pypi\n :target: https://pypi.org/project/psutil\n :alt: Latest version\n\n.. |py-versions| image:: https://img.shields.io/pypi/pyversions/psutil.svg\n :target: https://pypi.org/project/psutil\n :alt: Supported Python versions\n\n.. |packages| image:: https://repology.org/badge/tiny-repos/python:psutil.svg\n :target: https://repology.org/metapackage/python:psutil/versions\n :alt: Binary packages\n\n.. |license| image:: https://img.shields.io/pypi/l/psutil.svg\n :target: https://github.com/giampaolo/psutil/blob/master/LICENSE\n :alt: License\n\n.. |twitter| image:: https://img.shields.io/twitter/follow/grodola.svg?label=follow&style=flat&logo=twitter&logoColor=4FADFF\n :target: https://twitter.com/grodola\n :alt: Twitter Follow\n\n.. |tidelift| image:: https://tidelift.com/badges/github/giampaolo/psutil?style=flat\n :target: https://tidelift.com/subscription/pkg/pypi-psutil?utm_source=pypi-psutil&utm_medium=referral&utm_campaign=readme\n :alt: Tidelift\n\n-----\n\nQuick links\n===========\n\n- `Home page <https://github.com/giampaolo/psutil>`_\n- `Install <https://github.com/giampaolo/psutil/blob/master/INSTALL.rst>`_\n- `Documentation <http://psutil.readthedocs.io>`_\n- `Download <https://pypi.org/project/psutil/#files>`_\n- `Forum <http://groups.google.com/group/psutil/topics>`_\n- `StackOverflow <https://stackoverflow.com/questions/tagged/psutil>`_\n- `Blog <http://grodola.blogspot.com/search/label/psutil>`_\n- `Development guide <https://github.com/giampaolo/psutil/blob/master/docs/DEVGUIDE.rst>`_\n- `What's new <https://github.com/giampaolo/psutil/blob/master/HISTORY.rst>`_\n\nSummary\n=======\n\npsutil (process and system utilities) is a cross-platform library for\nretrieving information on **running processes** and **system utilization**\n(CPU, memory, disks, network, sensors) in Python.\nIt is useful mainly for **system monitoring**, **profiling and limiting process\nresources** and **management of running processes**.\nIt implements many functionalities offered by classic UNIX command line tools\nsuch as *ps, top, iotop, lsof, netstat, ifconfig, free* and others.\npsutil currently supports the following platforms:\n\n- **Linux**\n- **Windows**\n- **macOS**\n- **FreeBSD, OpenBSD**, **NetBSD**\n- **Sun Solaris**\n- **AIX**\n\n...both **32-bit** and **64-bit** architectures. Supported Python versions are **2.6**, **2.7** and **3.4+**. `PyPy3 <http://pypy.org/>`__ is also known to work.\n\npsutil for enterprise\n=====================\n\n.. |tideliftlogo| image:: https://nedbatchelder.com/pix/Tidelift_Logos_RGB_Tidelift_Shorthand_On-White_small.png\n :width: 150\n :alt: Tidelift\n :target: https://tidelift.com/subscription/pkg/pypi-psutil?utm_source=pypi-psutil&utm_medium=referral&utm_campaign=readme\n\n.. list-table::\n :widths: 10 150\n\n * - |tideliftlogo|\n - The maintainer of psutil and thousands of other packages are working\n with Tidelift to deliver commercial support and maintenance for the open\n source dependencies you use to build your applications. Save time,\n reduce risk, and improve code health, while paying the maintainers of\n the exact dependencies you use.\n `Learn more <https://tidelift.com/subscription/pkg/pypi-psutil?utm_source=pypi-psutil&utm_medium=referral&utm_campaign=enterprise&utm_term=repo>`__.\n\n By subscribing to Tidelift you will help me (`Giampaolo Rodola`_) support\n psutil future development. Alternatively consider making a small\n `donation`_.\n\nSecurity\n========\n\nTo report a security vulnerability, please use the `Tidelift security\ncontact`_. Tidelift will coordinate the fix and disclosure.\n\nExample applications\n====================\n\n+------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+\n| .. image:: https://github.com/giampaolo/psutil/blob/master/docs/_static/procinfo-small.png | .. image:: https://github.com/giampaolo/psutil/blob/master/docs/_static/top-small.png |\n| :target: https://github.com/giampaolo/psutil/blob/master/docs/_static/procinfo.png | :target: https://github.com/giampaolo/psutil/blob/master/docs/_static/top.png |\n+------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+\n| .. image:: https://github.com/giampaolo/psutil/blob/master/docs/_static/procsmem-small.png | .. image:: https://github.com/giampaolo/psutil/blob/master/docs/_static/pmap-small.png |\n| :target: https://github.com/giampaolo/psutil/blob/master/docs/_static/procsmem.png | :target: https://github.com/giampaolo/psutil/blob/master/docs/_static/pmap.png |\n+------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+\n\nAlso see `scripts directory <https://github.com/giampaolo/psutil/tree/master/scripts>`__\nand `doc recipes <http://psutil.readthedocs.io/#recipes/>`__.\n\nProjects using psutil\n=====================\n\npsutil has roughly the following monthly downloads:\n\n.. image:: https://img.shields.io/pypi/dm/psutil.svg\n :target: https://pepy.tech/project/psutil\n :alt: Downloads\n\nThere are over\n`10.000 open source projects <https://libraries.io/pypi/psutil/dependent_repositories?page=1>`__\non github which depend from psutil.\nHere's some I find particularly interesting:\n\n- https://github.com/google/grr\n- https://github.com/facebook/osquery/\n- https://github.com/nicolargo/glances\n- https://github.com/Jahaja/psdash\n- https://github.com/ajenti/ajenti\n- https://github.com/home-assistant/home-assistant/\n\n\nPortings\n========\n\n- Go: https://github.com/shirou/gopsutil\n- C: https://github.com/hamon-in/cpslib\n- Rust: https://github.com/borntyping/rust-psutil\n- Nim: https://github.com/johnscillieri/psutil-nim\n\n\nExample usages\n==============\n\nThis represents pretty much the whole psutil API.\n\nCPU\n---\n\n.. code-block:: python\n\n >>> import psutil\n >>>\n >>> psutil.cpu_times()\n scputimes(user=3961.46, nice=169.729, system=2150.659, idle=16900.540, iowait=629.59, irq=0.0, softirq=19.42, steal=0.0, guest=0, nice=0.0)\n >>>\n >>> for x in range(3):\n ... psutil.cpu_percent(interval=1)\n ...\n 4.0\n 5.9\n 3.8\n >>>\n >>> for x in range(3):\n ... psutil.cpu_percent(interval=1, percpu=True)\n ...\n [4.0, 6.9, 3.7, 9.2]\n [7.0, 8.5, 2.4, 2.1]\n [1.2, 9.0, 9.9, 7.2]\n >>>\n >>> for x in range(3):\n ... psutil.cpu_times_percent(interval=1, percpu=False)\n ...\n scputimes(user=1.5, nice=0.0, system=0.5, idle=96.5, iowait=1.5, irq=0.0, softirq=0.0, steal=0.0, guest=0.0, guest_nice=0.0)\n scputimes(user=1.0, nice=0.0, system=0.0, idle=99.0, iowait=0.0, irq=0.0, softirq=0.0, steal=0.0, guest=0.0, guest_nice=0.0)\n scputimes(user=2.0, nice=0.0, system=0.0, idle=98.0, iowait=0.0, irq=0.0, softirq=0.0, steal=0.0, guest=0.0, guest_nice=0.0)\n >>>\n >>> psutil.cpu_count()\n 4\n >>> psutil.cpu_count(logical=False)\n 2\n >>>\n >>> psutil.cpu_stats()\n scpustats(ctx_switches=20455687, interrupts=6598984, soft_interrupts=2134212, syscalls=0)\n >>>\n >>> psutil.cpu_freq()\n scpufreq(current=931.42925, min=800.0, max=3500.0)\n >>>\n >>> psutil.getloadavg() # also on Windows (emulated)\n (3.14, 3.89, 4.67)\n\nMemory\n------\n\n.. code-block:: python\n\n >>> psutil.virtual_memory()\n svmem(total=10367352832, available=6472179712, percent=37.6, used=8186245120, free=2181107712, active=4748992512, inactive=2758115328, buffers=790724608, cached=3500347392, shared=787554304)\n >>> psutil.swap_memory()\n sswap(total=2097147904, used=296128512, free=1801019392, percent=14.1, sin=304193536, sout=677842944)\n >>>\n\nDisks\n-----\n\n.. code-block:: python\n\n >>> psutil.disk_partitions()\n [sdiskpart(device='/dev/sda1', mountpoint='/', fstype='ext4', opts='rw,nosuid'),\n sdiskpart(device='/dev/sda2', mountpoint='/home', fstype='ext, opts='rw')]\n >>>\n >>> psutil.disk_usage('/')\n sdiskusage(total=21378641920, used=4809781248, free=15482871808, percent=22.5)\n >>>\n >>> psutil.disk_io_counters(perdisk=False)\n sdiskio(read_count=719566, write_count=1082197, read_bytes=18626220032, write_bytes=24081764352, read_time=5023392, write_time=63199568, read_merged_count=619166, write_merged_count=812396, busy_time=4523412)\n >>>\n\nNetwork\n-------\n\n.. code-block:: python\n\n >>> psutil.net_io_counters(pernic=True)\n {'eth0': netio(bytes_sent=485291293, bytes_recv=6004858642, packets_sent=3251564, packets_recv=4787798, errin=0, errout=0, dropin=0, dropout=0),\n 'lo': netio(bytes_sent=2838627, bytes_recv=2838627, packets_sent=30567, packets_recv=30567, errin=0, errout=0, dropin=0, dropout=0)}\n >>>\n >>> psutil.net_connections()\n [sconn(fd=115, family=<AddressFamily.AF_INET: 2>, type=<SocketType.SOCK_STREAM: 1>, laddr=addr(ip='10.0.0.1', port=48776), raddr=addr(ip='93.186.135.91', port=80), status='ESTABLISHED', pid=1254),\n sconn(fd=117, family=<AddressFamily.AF_INET: 2>, type=<SocketType.SOCK_STREAM: 1>, laddr=addr(ip='10.0.0.1', port=43761), raddr=addr(ip='72.14.234.100', port=80), status='CLOSING', pid=2987),\n ...]\n >>>\n >>> psutil.net_if_addrs()\n {'lo': [snicaddr(family=<AddressFamily.AF_INET: 2>, address='127.0.0.1', netmask='255.0.0.0', broadcast='127.0.0.1', ptp=None),\n snicaddr(family=<AddressFamily.AF_INET6: 10>, address='::1', netmask='ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff', broadcast=None, ptp=None),\n snicaddr(family=<AddressFamily.AF_LINK: 17>, address='00:00:00:00:00:00', netmask=None, broadcast='00:00:00:00:00:00', ptp=None)],\n 'wlan0': [snicaddr(family=<AddressFamily.AF_INET: 2>, address='192.168.1.3', netmask='255.255.255.0', broadcast='192.168.1.255', ptp=None),\n snicaddr(family=<AddressFamily.AF_INET6: 10>, address='fe80::c685:8ff:fe45:641%wlan0', netmask='ffff:ffff:ffff:ffff::', broadcast=None, ptp=None),\n snicaddr(family=<AddressFamily.AF_LINK: 17>, address='c4:85:08:45:06:41', netmask=None, broadcast='ff:ff:ff:ff:ff:ff', ptp=None)]}\n >>>\n >>> psutil.net_if_stats()\n {'lo': snicstats(isup=True, duplex=<NicDuplex.NIC_DUPLEX_UNKNOWN: 0>, speed=0, mtu=65536),\n 'wlan0': snicstats(isup=True, duplex=<NicDuplex.NIC_DUPLEX_FULL: 2>, speed=100, mtu=1500)}\n >>>\n\nSensors\n-------\n\n.. code-block:: python\n\n >>> import psutil\n >>> psutil.sensors_temperatures()\n {'acpitz': [shwtemp(label='', current=47.0, high=103.0, critical=103.0)],\n 'asus': [shwtemp(label='', current=47.0, high=None, critical=None)],\n 'coretemp': [shwtemp(label='Physical id 0', current=52.0, high=100.0, critical=100.0),\n shwtemp(label='Core 0', current=45.0, high=100.0, critical=100.0)]}\n >>>\n >>> psutil.sensors_fans()\n {'asus': [sfan(label='cpu_fan', current=3200)]}\n >>>\n >>> psutil.sensors_battery()\n sbattery(percent=93, secsleft=16628, power_plugged=False)\n >>>\n\nOther system info\n-----------------\n\n.. code-block:: python\n\n >>> import psutil\n >>> psutil.users()\n [suser(name='giampaolo', terminal='pts/2', host='localhost', started=1340737536.0, pid=1352),\n suser(name='giampaolo', terminal='pts/3', host='localhost', started=1340737792.0, pid=1788)]\n >>>\n >>> psutil.boot_time()\n 1365519115.0\n >>>\n\nProcess management\n------------------\n\n.. code-block:: python\n\n >>> import psutil\n >>> psutil.pids()\n [1, 2, 3, 4, 5, 6, 7, 46, 48, 50, 51, 178, 182, 222, 223, 224, 268, 1215, 1216, 1220, 1221, 1243, 1244,\n 1301, 1601, 2237, 2355, 2637, 2774, 3932, 4176, 4177, 4185, 4187, 4189, 4225, 4243, 4245, 4263, 4282,\n 4306, 4311, 4312, 4313, 4314, 4337, 4339, 4357, 4358, 4363, 4383, 4395, 4408, 4433, 4443, 4445, 4446,\n 5167, 5234, 5235, 5252, 5318, 5424, 5644, 6987, 7054, 7055, 7071]\n >>>\n >>> p = psutil.Process(7055)\n >>> p\n psutil.Process(pid=7055, name='python', started='09:04:44')\n >>> p.name()\n 'python'\n >>> p.exe()\n '/usr/bin/python'\n >>> p.cwd()\n '/home/giampaolo'\n >>> p.cmdline()\n ['/usr/bin/python', 'main.py']\n >>>\n >>> p.pid\n 7055\n >>> p.ppid()\n 7054\n >>> p.children(recursive=True)\n [psutil.Process(pid=29835, name='python2.7', started='11:45:38'),\n psutil.Process(pid=29836, name='python2.7', started='11:43:39')]\n >>>\n >>> p.parent()\n psutil.Process(pid=4699, name='bash', started='09:06:44')\n >>> p.parents()\n [psutil.Process(pid=4699, name='bash', started='09:06:44'),\n psutil.Process(pid=4689, name='gnome-terminal-server', started='0:06:44'),\n psutil.Process(pid=1, name='systemd', started='05:56:55')]\n >>>\n >>> p.status()\n 'running'\n >>> p.username()\n 'giampaolo'\n >>> p.create_time()\n 1267551141.5019531\n >>> p.terminal()\n '/dev/pts/0'\n >>>\n >>> p.uids()\n puids(real=1000, effective=1000, saved=1000)\n >>> p.gids()\n pgids(real=1000, effective=1000, saved=1000)\n >>>\n >>> p.cpu_times()\n pcputimes(user=1.02, system=0.31, children_user=0.32, children_system=0.1, iowait=0.0)\n >>> p.cpu_percent(interval=1.0)\n 12.1\n >>> p.cpu_affinity()\n [0, 1, 2, 3]\n >>> p.cpu_affinity([0, 1]) # set\n >>> p.cpu_num()\n 1\n >>>\n >>> p.memory_info()\n pmem(rss=10915840, vms=67608576, shared=3313664, text=2310144, lib=0, data=7262208, dirty=0)\n >>> p.memory_full_info() # \"real\" USS memory usage (Linux, macOS, Win only)\n pfullmem(rss=10199040, vms=52133888, shared=3887104, text=2867200, lib=0, data=5967872, dirty=0, uss=6545408, pss=6872064, swap=0)\n >>> p.memory_percent()\n 0.7823\n >>> p.memory_maps()\n [pmmap_grouped(path='/lib/x8664-linux-gnu/libutil-2.15.so', rss=32768, size=2125824, pss=32768, shared_clean=0, shared_dirty=0, private_clean=20480, private_dirty=12288, referenced=32768, anonymous=12288, swap=0),\n pmmap_grouped(path='/lib/x8664-linux-gnu/libc-2.15.so', rss=3821568, size=3842048, pss=3821568, shared_clean=0, shared_dirty=0, private_clean=0, private_dirty=3821568, referenced=3575808, anonymous=3821568, swap=0),\n pmmap_grouped(path='[heap]', rss=32768, size=139264, pss=32768, shared_clean=0, shared_dirty=0, private_clean=0, private_dirty=32768, referenced=32768, anonymous=32768, swap=0),\n pmmap_grouped(path='[stack]', rss=2465792, size=2494464, pss=2465792, shared_clean=0, shared_dirty=0, private_clean=0, private_dirty=2465792, referenced=2277376, anonymous=2465792, swap=0),\n ...]\n >>>\n >>> p.io_counters()\n pio(read_count=478001, write_count=59371, read_bytes=700416, write_bytes=69632, read_chars=456232, write_chars=517543)\n >>>\n >>> p.open_files()\n [popenfile(path='/home/giampaolo/monit.py', fd=3, position=0, mode='r', flags=32768),\n popenfile(path='/var/log/monit.log', fd=4, position=235542, mode='a', flags=33793)]\n >>>\n >>> p.connections()\n [pconn(fd=115, family=<AddressFamily.AF_INET: 2>, type=<SocketType.SOCK_STREAM: 1>, laddr=addr(ip='10.0.0.1', port=48776), raddr=addr(ip='93.186.135.91', port=80), status='ESTABLISHED'),\n pconn(fd=117, family=<AddressFamily.AF_INET: 2>, type=<SocketType.SOCK_STREAM: 1>, laddr=addr(ip='10.0.0.1', port=43761), raddr=addr(ip='72.14.234.100', port=80), status='CLOSING')]\n >>>\n >>> p.num_threads()\n 4\n >>> p.num_fds()\n 8\n >>> p.threads()\n [pthread(id=5234, user_time=22.5, system_time=9.2891),\n pthread(id=5237, user_time=0.0707, system_time=1.1)]\n >>>\n >>> p.num_ctx_switches()\n pctxsw(voluntary=78, involuntary=19)\n >>>\n >>> p.nice()\n 0\n >>> p.nice(10) # set\n >>>\n >>> p.ionice(psutil.IOPRIO_CLASS_IDLE) # IO priority (Win and Linux only)\n >>> p.ionice()\n pionice(ioclass=<IOPriority.IOPRIO_CLASS_IDLE: 3>, value=0)\n >>>\n >>> p.rlimit(psutil.RLIMIT_NOFILE, (5, 5)) # set resource limits (Linux only)\n >>> p.rlimit(psutil.RLIMIT_NOFILE)\n (5, 5)\n >>>\n >>> p.environ()\n {'LC_PAPER': 'it_IT.UTF-8', 'SHELL': '/bin/bash', 'GREP_OPTIONS': '--color=auto',\n 'XDG_CONFIG_DIRS': '/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg',\n ...}\n >>>\n >>> p.as_dict()\n {'status': 'running', 'num_ctx_switches': pctxsw(voluntary=63, involuntary=1), 'pid': 5457, ...}\n >>> p.is_running()\n True\n >>> p.suspend()\n >>> p.resume()\n >>>\n >>> p.terminate()\n >>> p.kill()\n >>> p.wait(timeout=3)\n 0\n >>>\n >>> psutil.test()\n USER PID %CPU %MEM VSZ RSS TTY START TIME COMMAND\n root 1 0.0 0.0 24584 2240 Jun17 00:00 init\n root 2 0.0 0.0 0 0 Jun17 00:00 kthreadd\n ...\n giampaolo 31475 0.0 0.0 20760 3024 /dev/pts/0 Jun19 00:00 python2.4\n giampaolo 31721 0.0 2.2 773060 181896 00:04 10:30 chrome\n root 31763 0.0 0.0 0 0 00:05 00:00 kworker/0:1\n >>>\n\nFurther process APIs\n--------------------\n\n.. code-block:: python\n\n >>> import psutil\n >>> for proc in psutil.process_iter(['pid', 'name']):\n ... print(proc.info)\n ...\n {'pid': 1, 'name': 'systemd'}\n {'pid': 2, 'name': 'kthreadd'}\n {'pid': 3, 'name': 'ksoftirqd/0'}\n ...\n >>>\n >>> psutil.pid_exists(3)\n True\n >>>\n >>> def on_terminate(proc):\n ... print(\"process {} terminated\".format(proc))\n ...\n >>> # waits for multiple processes to terminate\n >>> gone, alive = psutil.wait_procs(procs_list, timeout=3, callback=on_terminate)\n >>>\n\nPopen wrapper:\n\n.. code-block:: python\n\n >>> import psutil\n >>> from subprocess import PIPE\n >>> p = psutil.Popen([\"/usr/bin/python\", \"-c\", \"print('hello')\"], stdout=PIPE)\n >>> p.name()\n 'python'\n >>> p.username()\n 'giampaolo'\n >>> p.communicate()\n ('hello\\n', None)\n >>> p.wait(timeout=2)\n 0\n >>>\n\nWindows services\n----------------\n\n.. code-block:: python\n\n >>> list(psutil.win_service_iter())\n [<WindowsService(name='AeLookupSvc', display_name='Application Experience') at 38850096>,\n <WindowsService(name='ALG', display_name='Application Layer Gateway Service') at 38850128>,\n <WindowsService(name='APNMCP', display_name='Ask Update Service') at 38850160>,\n <WindowsService(name='AppIDSvc', display_name='Application Identity') at 38850192>,\n ...]\n >>> s = psutil.win_service_get('alg')\n >>> s.as_dict()\n {'binpath': 'C:\\\\Windows\\\\System32\\\\alg.exe',\n 'description': 'Provides support for 3rd party protocol plug-ins for Internet Connection Sharing',\n 'display_name': 'Application Layer Gateway Service',\n 'name': 'alg',\n 'pid': None,\n 'start_type': 'manual',\n 'status': 'stopped',\n 'username': 'NT AUTHORITY\\\\LocalService'}\n\n\n.. _`Giampaolo Rodola`: http://grodola.blogspot.com/p/about.html\n.. _`donation`: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A9ZS7PKKRM3S8\n.. _Tidelift security contact: https://tidelift.com/security\n.. _Tidelift Subscription: https://tidelift.com/subscription/pkg/pypi-psutil?utm_source=pypi-psutil&utm_medium=referral&utm_campaign=readme\n\n\n\n"
keywords = "ps,top,kill,free,lsof,netstat,nice,tty,ionice,uptime,taskmgr,process,df,iotop,iostat,ifconfig,taskset,who,pidof,pmap,smem,pstree,monitoring,ulimit,prlimit,smem,performance,metrics,agent,observability"
platform = "Platform Independent"
classifiers = "Development Status :: 5 - Production/Stable"
download_url = ""
comment = ""
md5_digest = "fa325ff4af570acc4c5461ee34037fe8"
sha256_digest = "b164827def7ea70e8fab2962df11621d6075205dc42a72b00c2c5e941931c1e7"
blake2_256_digest = "cff944b3e2cb162d323d70a6348b19c3b4eae8b6e3245842f11d45779b4f40e4"
requires_python = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
description_content_type = ""
":action" = "file_upload"
protocol_version = "1"
distrib = "psutil"
sha256 = "b164827def7ea70e8fab2962df11621d6075205dc42a72b00c2c5e941931c1e7"
[[pkgs]]
type = "github"