Porkchop

Software screenshot:
Porkchop
Rincian Software:
Versi: 0.7.3
Tanggal Upload: 15 Apr 15
Pengembang: Scott Smith
Lisensi: Gratis
Popularitas: 2

Rating: nan/5 (Total Votes: 0)

Porkchop adalah sistem informasi server berbasis HTTP sederhana yang ditulis dalam Python & nbsp;. Anda menulis plugin untuk itu dan menanggapi dengan data berdasarkan permintaan Anda.
Berikut adalah contoh:
scott @ beatbox: ~% http ikal: // localhost: 5000 / cpuinfo
/ Cpuinfo / processor2 / FPU ya
/ Cpuinfo / processor2 / f00f_bug ada
/ Cpuinfo / processor2 / cache_alignment 64
/ Cpuinfo / processor2 / vendor_id AuthenticAMD
/ Cpuinfo / processor2 / bendera FPU
/ Cpuinfo / processor2 / BogoMips 6384
/ Cpuinfo / processor2 / hlt_bug ada
/ Cpuinfo / processor2 / apicid 2
/ Cpuinfo / processor2 / fpu_exception ya
/ Cpuinfo / processor2 / menginjak 3
/ Cpuinfo / processor2 / wp ya
/ Cpuinfo / processor2 / saudara kandung 4
/ Cpuinfo / processor2 / model 4
/ Cpuinfo / processor2 / coma_bug ada
/ Cpuinfo / processor2 / fdiv_bug ada
/ Cpuinfo / processor3 / FPU ya
/ Cpuinfo / processor3 / f00f_bug ada
/ Cpuinfo / processor3 / cache_alignment 64
/ Cpuinfo / processor3 / vendor_id AuthenticAMD
/ Cpuinfo / processor3 / bendera FPU
/ Cpuinfo / processor3 / BogoMips 6384
/ Cpuinfo / processor3 / hlt_bug ada
/ Cpuinfo / processor3 / apicid 3
/ Cpuinfo / processor3 / fpu_exception ya
/ Cpuinfo / processor3 / menginjak 3
/ Cpuinfo / processor3 / wp ya
/ Cpuinfo / processor3 / saudara kandung 4
/ Cpuinfo / processor3 / model 4
/ Cpuinfo / processor3 / coma_bug ada
/ Cpuinfo / processor3 / fdiv_bug ada
[Snip]
/ Waktu 1311387215
scott @ beatbox: ~%
Hal ini juga dapat merespon dengan JSON melalui ekstensi file .json atau pengaturan Accept: application / json sundulan.
scott @ beatbox: ~% http ikal: // localhost: 5000 / cpuinfo.json
{"Cpuinfo": {"processor2": {"FPU": "ya", "f00f_bug": "tidak", "cache_alignment": "64", "vendor_id": "AuthenticAMD", "bendera": "FPU" , "BogoMips": "6384", "hlt_bug": "tidak", "apicid": "2", "fpu_exception": "ya", "melangkah": "3", "wp": "ya", " saudara ":" 4 "," model ":" 4 "," coma_bug ":" tidak "," fdiv_bug ":" tidak "}," processor3 ": {" FPU ":" ya "," f00f_bug ":" no "," cache_alignment ":" 64 "," vendor_id ":" AuthenticAMD "," bendera ":" FPU "," BogoMips ":" 6384 "," hlt_bug ":" tidak "," apicid ":" 3 " , "fpu_exception": "ya", "melangkah": "3", "wp": "ya", "saudara": "4", "model": "4", "coma_bug": "tidak", " fdiv_bug ":" tidak "}," processor0 ": {" FPU ":" ya "," f00f_bug ":" tidak "," cache_alignment ":" 64 "," vendor_id ":" AuthenticAMD "," bendera ":" FPU "," BogoMips ":" 6382 "," hlt_bug ":" tidak "," apicid ":" 0 "," fpu_exception ":" ya "," melangkah ":" 3 "," wp ":" ya " , "saudara": "4", "model": "4", "coma_bug": "tidak", "fdiv_bug": "tidak"}, "processor1": {"FPU": "ya", "f00f_bug" : "tidak", "cache_alignment": "64", "vendor_id": "AuthenticAMD", "bendera": "FPU", "BogoMips": "6384", "hlt_bug": "tidak", "apicid": " 1 "," fpu_exception ":" ya "," melangkah ":" 3 "," wp ":" ya "," saudara ":" 4 "," model ":" 4 "," coma_bug ":" tidak " , "fdiv_bug": "tidak"}}, "waktu": "1311389934"}
scott @ beatbox: ~%
Instalasi
pip menginstal porkchop
atau
python setup.py install
Menulis Plugin
Ini cukup mudah untuk menulis sebuah plugin baru. Mereka hanya modul Python dengan beberapa atribut umum:
- Sebuah plugin harus subclass porkchop.plugin.PorkchopPlugin.
- Kelas plugin harus bersufiks dengan Plugin. Nama file yang sebenarnya di direktori Plugin juga harus sesuai awalan. Sebagai contoh, FooPlugin akan berada di file foo.py
- Kelas plugin harus berisi metode yang disebut get_data yang mengembalikan kamus informasi yang akan ditampilkan.
Secara default, metode get_data plugin ini hanya akan dipanggil jika data sudah tua lebih dari 60 detik. Hal ini dapat diubah pada basis per-plugin dengan menetapkan self.refresh dalam metode ___init___ kelas itu.
. Plugin ini dapat ditempatkan dalam direktori yang Anda pilih, dan dimuat dengan melewati opsi -d untuk porkchop

Persyaratan :

  • Python

Perangkat lunak lain dari pengembang Scott Smith

Decode Reply Tool
Decode Reply Tool

14 Apr 15

dvdauthor
dvdauthor

28 Sep 15

Tenderloin
Tenderloin

20 Feb 15

Komentar untuk Porkchop

Komentar tidak ditemukan
Tambahkan komentar
Aktifkan gambar!